New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
returns error #3
Comments
tried with forked version (see pull requests) |
I assume the error occurs as the new CSV has level 0 assigned instead of starting with level 1. |
If I cange line 94 into |
Yes, this is because level 0 would be the table of contents, the ratio of having the table of contents as a first range is that you can define custom ranges for structuring some composite text that does not follow the table of contents. If you need to start from 0, I think it's better to do like this: manifest.structures = []
rng = manifest.add_range_to_structures()
rng.set_id(extendbase_url="range/")
rng.add_label('en',"Tables of Contents")
strdic = {-1:rng}. # first range (table of contents) is now labelled -1 (called range in the URI)
last_label = None
rngind = defaultdict(int)
idx = 0
with open('metadata_v4.csv') as csv_file, open('imageurllist.txt') as url_list:
data = csv.DictReader(csv_file, delimiter=',')
lastlevel = 0 # the first usable range is now 0 |
yes, better this way |
The text was updated successfully, but these errors were encountered: