Giter Club home page Giter Club logo

batchuploadtools's People

Contributors

lokal-profil avatar vesihiisi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

batchuploadtools's Issues

Document structure of needed input for prepUpload

Per request from @mattiasostmar

Document the needed/expected structure of the json data file and any assumptions made about it's contents.

Also clarify if we support filenames (i.e. original image names) which are only unique when we also considering it's directory.
I.e.

  • dir_1/image1.jpg
  • dir_2/image1.jpg

(Thus requiring the folder name is included in the dictionary key of the .json)

Deprecate SMM/check_indata

SMM/check_indata.py is largely deprecated but still contains methods for building/setting up original mappings.

This functionality should be integrated into the abstract classes after which check_indata.py can either be deleted or rebuilt on top of these classes.

AttributeError: 'str' object has no attribute 'decode' in prepUpload.py

Another py2 -> py3 issue:

08:54 $ python /home/mos/anaconda3/lib/python3.5/site-packages/batchupload/prepUpload.py -in_path:~/Documents/testimages -out_path:~/Documents/testimages_renamed -data_path:./mexiko_info_data.json
Traceback (most recent call last):
  File "/home/mos/anaconda3/lib/python3.5/site-packages/batchupload/prepUpload.py", line 192, in <module>
    main()
  File "/home/mos/anaconda3/lib/python3.5/site-packages/batchupload/prepUpload.py", line 176, in main
    in_path = helpers.convertFromCommandline(value)
  File "/home/mos/anaconda3/lib/python3.5/site-packages/batchupload/helpers.py", line 380, in convertFromCommandline
    return s.decode(sys.stdin.encoding or
AttributeError: 'str' object has no attribute 'decode'
<class 'AttributeError'>
CRITICAL: Closing network session.

Cannot Pip install - requiring an older version of pywikibot?

I can't find out how to find a version number corresponding to the way you've set the requirements in the pip install package, I've got pywikibot==2.0rc5.

!pip install https://github.com/lokal-profil/BatchUploadTools/tarball/0.0.1

Collecting https://github.com/lokal-profil/BatchUploadTools/tarball/0.0.1
Downloading https://github.com/lokal-profil/BatchUploadTools/tarball/0.0.1
/ 81kB 313kB/s
Collecting pywikibot==3.0-dev (from BatchUploadTools==0.0.1)
Could not find a version that satisfies the requirement pywikibot==3.0-dev (from BatchUploadTools==0.0.1) (from versions: 2.0rc1.post1, 2.0rc1.post2, 2.0rc3, 2.0rc4, 2.0rc5)
No matching distribution found for pywikibot==3.0-dev (from BatchUploadTools==0.0.1)
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Merge common and helpers

common.py and helpers.py largely overlap.

Figure out a good division (potentially along the lines of which work with wiki syntax/wiki conventions) then reshuffle/rename.

Also ensure that all methods are still in use and properly documented/tested.

Error with cleanstring in helpers

Seems to be a Py 2 vs 3 compatibility issue:
http://python-future.org/compatible_idioms.html#iterating-through-dict-keys-values-items


AttributeError Traceback (most recent call last)
in ()
1 for index, row in mexiko.iterrows():
----> 2 create_infofiles(row)

in create_infofiles(row)
4 infotext = "{{photograph\n"
5
----> 6 new_filename = create_new_filename(row)
7
8 lacking_description = False

in create_new_filename(row)
65 #fname = construct_new_name_from_dataframe(row, id_str)
66 description = compose_description(row)
---> 67 checked_fname = helpers.format_filename(description, "SMVK", id_str)
68 print("fname: {}\nchecked_fname: {}\n".format(fname, checked_fname))
69 return fname

/home/mos/anaconda3/lib/python3.5/site-packages/batchupload/helpers.py in format_filename(descr, institution, idno, delimiter)
90 """
91 delimiter = delimiter or u' - '
---> 92 descr = shortenString(touchup(cleanString(descr), delimiter))
93 institution = cleanString(institution)
94 idno = cleanString(idno)

/home/mos/anaconda3/lib/python3.5/site-packages/batchupload/helpers.py in cleanString(text)
110 u'e´': u'é',
111 u'”': u' ', u'"': u' ', u'“': u' '}
--> 112 for k, v in bad_char.iteritems():
113 text = text.replace(k, v)
114

AttributeError: 'dict' object has no attribute 'iteritems'

standardise docstrings

The docstrings use a mishmash of different formats (especially when it comes to parameter description).

Standardise and activate pydocstyle in tox

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.