This commit adds support for tracking and resolving clashes of output
locations. Previously open-ended clash dependency chains could passively
resolve across multiple Cinera invocations (undesirable, but possible);
whereas closed-loop dependency chains could not resolve without the user
manually resolving them by moving one clash to a temporary location (not
acceptable). This new support handles such clashes in one fell swoop.
Other smaller changes in this commit:
• Change message_control to use memory_book
• Fix deletion of old .index files when reorganising projects
• Fix deletion of moved entries when subdividing projects
This commit adds support for deduplication of messages emitted by
PrintEdit(). It's a first pass, only supporting single-line messages and
ones no larger than 512 bytes.
It also fixes StringContains() to skip strings shorter than the search
substring, and emits a more sensible error on empty "output" value.
This commit adds support for configurably enabling closed captions by
default. Set the "default_cc_lang" in a config file, or "cc_lang" in the
[video] node of an .hmml file. Once set, videos which contain captions
for this langage will be initialised with these captions enabled.
New config setting:
default_cc_lang
New [video] node field:
cc_lang
This commit makes the auto-derivation of name abbreviations code handle
quoted nicknames and lower-cased surname prefixes (e.g. du Pré). It also
upstreams the abbreviation to config parse time, and introduces config
fields in the person scope to allow overwriting the auto-derived ones.
Bug fixes:
• Fix null pointer dereference in InsertProjectIntoDB(), due to a
rogue WriteFromByteToPointer() call left in when removing the
_TopLevel() database modification functions in v0.10.14
• Fix config file locking by closing all config files on detecting
a config file change, even if we had no prior working config
• Increase IncludesSearch buffer size from 2 to 4KB
New config fields in the person scope:
• abbrev_initial
• abbrev_given_or_nickname
• abbrev_dotted_initial_and_surname
This commit aims to help Cinera instances coordinate themselves by
throwing an error upon being instructed to use a database or config
file currently in use by another instance.
New config options:
numbering_filename_prefix (string)
Defaults to $project
numbering_method
auto
filename_derived (default)
hmml_specified
numbering_start (number)
May be used to 0-index the set
numbering_unit (renamed from "unit")
numbering_zero_pad (boolean)
This commit also fixes the size of the "?" help button and category dots
when the wider site uses box-sizing: border-box
• Fix segfault due to unconfigured role
• Add credit scope to the root scope's TypeSpec, permitting
credit = "$owner" { role = "host"; }
to be absorbed by all projects
• Make "unfound role" errors WaitForInput()
Features:
User-configurable roles and credits
Handle SIGINT to quit cleanly and avoid database corruption
Fixes:
Filesystem event monitoring handles directory creation / deletion
Fixed buffer overflow when trying to curl in a non-existent quote
Major features:
Search page: Subdivision grid layout
Player page: Device orientation-specific layout
Fixes:
Strip slashes of the URLs: base_url, etc.
Fix SnipeChecksumAndCloseFile() to not null-terminate the checksum string
Fix hover background colouration of medium icons of current timestamp
Fix DeriveLineageWithoutOriginOfProject() to call InitBookOfPointers()
Fix SortAndAbbreviateSpeakers() to use the person's ID if Name is blank
More directly display the "unit", if set, in the search results
Fix VideoIsPrivate() to find the apparently relocated privacyStatus
Make VideoIsPrivate() default to TRUE for non-youtube
Output as keywords all topics that do not match "nullTopic"
Deleted asset:
cinera_search.js
New assets:
cinera_search_pre.js
cinera_search_post.js
Fixes / Improvements:
• Switch all growable arrays to use memory_book, rather than realloc()
• Lift a bunch of hardcoded string lengths and item counts
• malloc() the MemoryArena rather than calloc(), thus saving 3 MiB
• Reorganise HMMLToBuffers() to return from one place, the end
• Print indexing errors in the same style as config errors / warnings
Diagnoses:
• Identified sources of "non-freed" memory usage and marked them +MEM.
This may aid future work on further reducing memory / cycle usage.
New config settings:
• suppress_prompts boolean
• Segfault was due to a read access violation on an unset entry pointer,
which in turn was due to stale neighbourhood data. To fix it we simply
reset the neighbourhood when starting to delete an entry. Additionally
we now check that those entry pointers are set before accessing them.
• Event handling of the trio of events triggered when vim saves a file.
We now read in a second set of events while processing the first if we
were on the verge of processing a deletion. If we get any more events,
we continue to squash those ones if possible, to always end up having
seen the entire trio of events associated with a file save, and then
process it as an insertion / reinsertion, not a deletion.
• Sort the asset landmarks by their offset.
• Change GenerateTopicColours() to initially open cinera_topics.css as
"r" to search it for the incoming topic, and only if that topic is
absent reopen it as "a+", thus triggering an IN_CLOSE_WRITE event.
It was just a typo. HMMLToBuffers() passed the global config pointer,
rather than the passed in one, to GenerateNavigation().
Also switch the entire config over to use memory_book style allocation.
This saves us from having to offset pointers when memory gets realloc'd.
Config parsing now errors-out when it detects clashes between:
base_dir and search_location, and global_search_dir
base_dir and player_location
This prevents us from generating search / project pages of multiple
projects (incl. global_search_dir) at the same location, which would
screw up the asset landmarks.
On the search pages use the search_location and player_location, in
addition to the base_url, to associate filter and index entries, such
that the filter actually works.
Fix the .index file location for projects with a search_location. As
this is now consistent, we happen to fix a crash that happened when
changing the search_location.
New config option:
deny_bespoke_templates
Indexers may use the "template" attribute in the video node of
an .hmml file to set a bespoke template for that entry,
superseding any configured player_template. Setting
"deny_bespoke_templates" to true prevents this.
• Pack all templates before sync'ing the projects
• Delay generation of navigation bars until BuffersToHTML(), and free them
when switching projects
• Change many variably-lengthed items to use memory_book
• Do not push on multiple support scopes with the same ID
• Prevent crash when trying to snipe an asset checksum into an HTML file
we were never permitted to create
• Reorganise ReadFileIntoBuffer() and related functions into cinera.c
New Template Tags:
__CINERA_GLOBAL_NAV__
Passing an empty string to StripSlashes() would crash.
Also add a conditional around the ctime calls in the Won Build System,
to only run it if it exists.
Database version 5
Major features:
Config file parsing
Multiple projects per instance
Searching across multiple projects
Art sprites, usable by project, medium and support
Minor features:
The search results are now sortable
Optimised the search page sorting
Fixes:
More reliable file system monitoring
Well-formed templates are now valid, even with the absence of assets
Correctly resove ~ in paths
Gracefully handle the lack of an internet connection
Renamed "annotator" to "indexer"
Removed PlayerURLPrefix, in favour of .hmml "output" parameter
Replaced the flags collection with:
-0 Dry-run mode
-c Set the config file path
-e Examine the database
-v Print version
-h Print help
New template tags:
__CINERA_NAV__ dropdown
__CINERA_NAV__ horizontal
__CINERA_NAV__ plain
__CINERA_PROJECT_PLAIN__
Deleted template tags:
__CINERA_MENUS__
__CINERA_SCRIPT__