Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

[Enhancement] Thumbnail presentation #17

Closed
JoelGardes opened this issue Dec 15, 2016 · 5 comments
Closed

[Enhancement] Thumbnail presentation #17

JoelGardes opened this issue Dec 15, 2016 · 5 comments
Assignees

Comments

@JoelGardes
Copy link
Collaborator

For increasing graph lisility, here are two enhancements using imagemagick's convert properties

  1. non graphical files
    Adding file name in a empty bitmap
    General syntax :
    "convert -pointsize 36 -fill red -background white label:<file_name> ../thumbnails/<index_name>.png"
    including subdirectories names of main directory
    but with discrete and tasteful colors

  2. graphical files
    Adding files name label to thumbnail
    General syntax to add to present convert command:
    "label:'<initial_filename>' -gravity Center -append"

<initial_filename> does not contain directory path, other option stays unchanged.

Joined : produced exemples

Non graphical:
4000

Graphical:
0

@JoelGardes
Copy link
Collaborator Author

Forgotten to add to backlog, sorry!

@ChristopheMaldivi
Copy link
Member

About initial_filename:

  • it is not the internal ID filename, but rather the original filename which could be a mess: with specials chars not easily supported by tools (graphviz or image magic)
  • so instead of using initial_filename directly, we will display the url encoded version

For instance:

  • "chat" => "chat"
  • "château" => "ch%C3%A2teau"

Easiest way to support all special chars, with something which is still readable. And no impact for files containing no special chars.

@JoelGardes
Copy link
Collaborator Author

JoelGardes commented Dec 20, 2016

Comment : Stuffs for string names problems in GraphViz :

Authorized chars for IDs:

  • Any string of alphabetic ([a-zA-Z\200-\377]) characters, underscores ('_') or digits ([0-9]), not beginning with a digit;
  • a numeral [-]?(.[0-9]+ | [0-9]+(.[0-9]*)? );
  • any double-quoted string ("...") possibly containing escaped quotes ('")1;
  • an HTML string (<...>).

Tested : <arc-en-ciel> works well in neato, by displaying the string "arc-en-ciel" (but a node named arc-en-ciel is forbidden).

This does not resolve the problem with directories names, but could be perhaps helpful for file_names retrieving when computing graph.

@JoelGardes
Copy link
Collaborator Author

Problem : no file_name included in thumbnails (missing label)... just a convert of graphical files

@JoelGardes
Copy link
Collaborator Author

issue #42

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants