Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Friday, December 12, 2025

Citation Networks of Role-Playing Game Blogs

A new network of RPG blogs has just been built by elmcat. In his post, Mapping the Blogosphere, elmcat explains his project involving web scraping, analysis, and the publication of results in the form of a superb interactive visualization.

One format to gather them all

His idea of using RSS to obtain super-clean blog posts (no banners, no JavaScript, etc.) is brilliant!

I had actually tried to build a similar project using ObservableHQ for the dataviz component, combined with a mix of Python scripts, wget, and httrack for the web scraping. However, I eventually stopped because the scraping itself was a colossal task, especially when it came to cleaning the data of all the excess code. I really should try again using this RSS-based method.

And in the darkness, hypotheses to forge

Through Mastodon, I asked elmcat a few questions and hypotheses to test.

Does citing inline (not blog roll) make a blog last longer? Produce more content?

Does citing other blogs by creating links within blog posts (rather than in the sidebar or header, i.e., in a generic way) make a blog last longer or produce more content? This is based on the hypothesis that community connections make blogs more enduring or more productive.

Does new bloggers cite more legacy bloggers compared to the avg bloggers, and to well established bloggers?

Do newcomers to the blogosphere cite more than average bloggers, or than well-established, reputable bloggers? Based on the hypothesis that people cite to connect to a movement or to other individuals, or that blogging may be a response to ideas expressed elsewhere that they wish to continue engaging with.

Is there a curve/pattern of citing over time?

Is there a curve in the number of links to other blogs over the lifespan of a blog? For instance, do people cite more at the beginning, or at the end, etc.

Do citing somebody make you cited by them afterwards?

Does citing a blog post make it more likely that you will be cited back later? Does citing create connection and reciprocity? For example, breaking the fourth wall: I am currently citing elmcat and his project, but I do not know whether I will be mentioned in return.

Prospects

To answer all these questions, one must not only collect and structure the data, but also have statistical analysis methods that I do not yet master. Perhaps elmcat will provide part of these answers.

In the meantime, the first observation suggested by the citation graph of the blogs is the existence of several groups, currents, or trends within the OSR (the Old School Renaissance play style relied heavily on blogs to share gaming experiences and innovations). Although many bloggers identify with this movement, the graph seems to reveal a great diversity of sub-communities rather than a single homogeneous whole.


Thursday, July 10, 2025

Creating an anthology of game design 2/*

This post is a follow-up to the previous one, in which I described the construction of an ontology of role-playing game design. I'm sharing some of the results of this ongoing project.

New ontology

While I was working on the hierarchical relationships between the game design classes, I was developing the individuals to see if the system worked and what needed to be fixed.

From now on, the classes are more compact and I continue to clean them up to bring them together even more, because what makes a class strong is to bring together elements around it. To avoid going too granular, I also work on their hierarchy by trying not to make hierarchies too deep and therefore too forced. By better separating individuals from classes, the taxonomy is considerably simplified with a more spread-out factorization of concepts. I was strongly inspired by the work of Guillaume and Thibault Rioult and their PERSO model (1) to describe the game design bricks. More specifically, I used their divisions into functional operators ("substitution operator", etc.).

Each individual is now a module/brick/game design innovation of a particular role-playing game.

· They are not exhaustive in relation to a game.
· They are especially notable.
. There can be several per game.
. Examples of individuals: Apocalypse World moves , backup your ego in Eclipse Phase, etc.

Visualizations

Everything is built in WebProtégé, exported in RDF/OWL (an XML format). From this XML format, I mill it into 3 Python scripts to make simple visualizations. I created a repo in GitHub with a recent export of the OWL and the Python scripts. The HTML visualizations (linked and previewed below) are available on GitHub.io.

Examples of all nested classes with the individuals using them:

 

Examples of individuals with classes : 

 

Examples of individuals with classes and (sometimes) descriptions :  

 

genAI: 1 advantage 3 problems

For some individuals, the full description is placed in a drop-down menu (see image above). It was automatically generated by Google Gemini's generative artificial intelligence.

Advantage

In most of the well-known games, Google Gemini produced a quality text whose main use was to serve, after reading it by me, to complete the indexing with missing classes that had escaped me . This is a big advantage in my opinion AND a rather ethical use (when it is declared) since the generated text supports a task. It does not replace it or substitute for it.

Problems

However, in some cases of niche mechanics or games, Google Gemini has produced bullshit, admittedly with subjunctives ( would , could , ... ) but in a formally convincing manner if one does not know the games. Below is an excerpt from a failed attempt to explain what the approval mechanic is in Fréderic Sintes' Prosopopée. 

Additionally, last week Google Gemini aggressively pushed its algorithm across most of its products (Android, etc.) and that added another layer of rejection to this particular tool.

Finally, the time savings are rather marginal compared to the task of visiting a few websites and reading explanations on your own. Furthermore, these tools obscure the work of the authors and critics who have studied the games. To counterbalance this last point, I added links to authentic sources to the WebProtégé OWL file.

RDFS, SKOS or DC fields

Fields can follow different standards to describe data and metadata. These are specifically adapted for the sematic web and linked data. In an RDF/OWL file, these three standards can be found to describe an element. For each field, the language is coded in ISO 639: fr, en, es, pt, etc.

rdfs:label

Class Taxonomy: The name of the game design, usually beginning in lowercase. The textual form should be as short and unambiguous as possible.  

Individuals: The name of the game design, often in the form of a short sentence or title. Begins with a capital letter. Followed by the name of the game in parentheses (parentheses are reserved characters for this use).

skos:altLabel

Synonyms for the label.

skos:definition

Short definition of one to three sentences.

dc:description

Full description in MarkDown format. When this field is filled in, it is of-
ten copied and pasted from Google Gemini or other LLM if they have
produced a satisfactory summary.

dc:source 

URL or bibliographic reference of the information source.

rdfs:seeAlso

Cross-reference. Indicates what other descriptor could be used in addi-
tion.

Remaining aporias in the ontology of classes

  • The temptation is sometimes strong to make double (or triple) parents rather than restricting oneself to a single parent per subclass.
  • Dice pool: do I create two subcategories: linear dice pool and non-linear dice pool ? or do I separate these two in case there are other linear and non-linear elements?
  • I need to figure out how to count the number of times each class is used. A class used once is not very relevant.
  • Do I separate Magic into a separate class from the rest or do I integrate it into the other classes?
  • Dice mechanics : potentially deep + separate concepts well. For example, roll-under > roll under target number (a class and its related subclass) be- comes: roll-under + target number (two separate classes to combine if necessary).
  • Write class and individual labels correctly with controlled vocabulary (to be done):
    • player character
    • player
    • gamemaster
    • participants (P+GM)
  • Clearly describe the definitions to remove ambiguities.
  • Write a data dictionary.

Research questions and hypotheses

  • Is an individual indexed with a lot of classes a sign of innovation, fun, etc .?
  • How can we use this ontology to index an entire game, rather than just bricks of a game element?
  • How to align part of this ontology with Wikidata?

Références : 

(1) Guillaume et Thibault Rioult, 2024,  Interfaces ludiques entre système de jeu et fiction, outil de modélisation au service du game design au colloque « Le jeu de rôle a 50 ans. Et maintenant, que faites-vous ?… » à la Sorbonne.

 

Monday, June 2, 2025

Creating an Ontology of Role-Playing Game Designs

I've recently resumed a project I had left dormant: celebrating game design innovations in role-playing games. Previously, I had included this dimension in the TTTTRPG (Timeline Tree of Tabletop Role-Playing Games) timeline. I've decided to extract it from that timeline and create a separate ontology.

Ontology

An ontology is a structured system for representing and organizing information within a specific domain. It doesn't just list elements; it establishes clear relationships between them, creating a framework for understanding and reasoning. In our case, this ontology will primarily rely on two elements:

  • A taxonomy, which is a hierarchical list of concepts, classes, and multiple levels of subclasses. These classes represent theoretical ideas or abstract concepts. They are "mental constructs" that don't exist physically but help us categorize the world. Under each class, there will be increasingly specific levels of subclasses. This tree-like structure allows for precise classification and logical navigation through the concepts.
  • A list of individuals, which are the concrete elements of the world that will be indexed (described) with one or more links, each link pointing to a class. Unlike classes, which are abstractions, individuals are tangible or specific entities.

In this example, the taxonomy will represent all types of game design, or more broadly, all "ludemes" (bits of game elements). The individuals will be specific and interesting game designs from notable games. The game's name is added in parentheses after the game design's label.

Examples:

    Ghost die
  • The ghost die from Ghostbusters (1986) is an instance of the subclass side die and the subclass die with special icon(s).
  • Changing alignment due to famine in Dark Sun (1991) is an instance of the subclass food resource management, the subclass alignment change, and the subclass players lose control of character.

My Mistake Last Month

I started building a huge taxonomy of classes and subclasses that ALSO integrated game designs from certain games INTO the class tree (often at the end/bottom of subclasses). In this organization, the individuals were the games.

Extrait de l'ontologie erronée dans WebProtégé

Excerpt from the erroneous ontology in WebProtégé


This isn't entirely bad in itself, but this knowledge system has limitations:

  • If a game design has multiple dimensions (like the famine example mentioned previously), then you have to choose only one. Of course, it's always possible for a subclass to have multiple parents, but it's not very elegant.
  • If we plan to comprehensively list all role-playing games and their game design mechanics, it's crucial not to overload the class taxonomy with excessive granularity. Trying to create classes for every specific game design element could turn the taxonomy into an "overloaded tree," potentially too heavy and difficult to manage.

Compressed archive containing the 4 files from this erroneous step (in an open science approach):

  • TTTRPG_ontologie-erronee.owl: Erroneous data organization in RDF/XML format. It can be loaded into WebProtégé (a simple and free online service) or Protégé (a more advanced, free/open-source software).
  • ontology_formatter_rdf_owl_to_html_tree_with_individuals.py: A Python script to transform this file into a readable HTML file: owl_class_tree_with_individuals.html
  • change-owl.py: A Python script to transform this ontology into a more satisfactory one (still needs a lot of work but on a good foundation). It was designed in conversation with Anthropic's Claude 4. The prompt is included in the script.
« Bye bye ontologie erronée »
« Bye bye ontologie erronée »

 

How to Design a (Good) Game Design Ontology?

The key is to find a balance. It's better to maintain a more general and abstract taxonomy, relying on individuals to be indexed in parallel. Each role-playing game design element (an individual) can be described with precise links to the relevant classes in the taxonomy. For example, instead of creating a class for each type of dice pools used, we could have a more general dice pool class, or one or two subclasses (e.g., linear dice pool, non-linear dice pool), and let the individual's description specify the type of dice used.

This approach allows for a clear and manageable taxonomy while offering the necessary flexibility to capture the specific details of each role-playing game via the links between the taxonomy and the list of individuals.

Creating a Taxonomy of Classes and Subclasses

This means creating a hierarchical list of concepts to describe, classify, group, and qualify the various existing game design elements.

Here's an overview of this taxonomy in WebProtégé:

Exemple de taxonomie avec classes et sous-classes
Example of taxonomy with classes and subclasses

 

Ideally, each more specific element (child) should have only one more generic element (parent) because this ensures a clear hierarchical structure and avoids ambiguities in the inheritance of properties and relationships. Generally, I think this indicates a well-thought-out and structured breakdown, as it forces the factorization of ideas into different, separate categories and requires making choices. Additionally, remember that an individual can belong to multiple classes.

In an ontology, a subclass inherits all the characteristics (properties) and definitions (axioms and concepts) of its parent classes (or superclasses). For example: moral mechanics has the attributes of character mechanics, and themselves have the attributes of game mechanics.

Indexing a Series of Individuals

Each individual is of one or more Types, derived from a class or subclass. For now, there is only one type of individual: game designs. Currently, the associated game names are hardcoded as a string in parentheses within the individual's label.

Example: Ghost die (Ghostbusters)

Exemple d'individu

Example of an individual

 


Drawbacks

Besides the need to re-index everything, separating specific game designs into individuals prevents me from displaying them all together and grouping them as was possible before (in the erroneous case). Even though it's better designed, I feel a loss of control because the visualization of the data together is lost. This is likely why I initially pursued an erroneous path that gave me a greater sense of control over the overall ontology.

Comments on Generative AIs

I find Google Gemini to be very good at generating accurate comments on the most well-known rules of notable role-playing games (GURPS, D&D, CoC, etc.). I don't know if it's as good for niche games. A deontological drawback: it invisibilizes all those who have done analyses, critiques, or written the text of the games.

Anthropic's Claude is very good at generating somewhat complex computer code. The change-owl.py script (see above) which transforms the old erroneous ontology into the new one was not a foregone conclusion. OpenAI's ChatGPT, on the other hand, yielded nothing good after many attempts. Anthropic's Claude produced good code with almost the same prompts in two trial-and-error attempts. I have no conflict of interest with the mentioned products. I only used the free versions.

To Be Continued

Once the new ontology and individuals are stable, I will share everything again as part of an open science initiative. This will be done in open files (likely RDF/XML for the complete structure and HTML for visualization).

In my wildest dreams, I imagine this being used to create a large database indexing tabletop role-playing game designs. Perhaps as a participatory science endeavor, where several volunteer participants could contribute? By integrating all or part of it into Grog, RPGGeek, or Wikidata?

To my knowledge, this would be the first detailed catalog of game mechanics. Exciting!

 

Wednesday, October 30, 2024

Almost 50 Years of Academic Research on Tabletop Role-Playing Games: Historical Evolution and Bibliometric Analysis

Almost 50 Years of Academic Research on Tabletop Role-Playing Games: Historical Evolution and Bibliometric Analysis

https://pmartinolli.github.io/JDR50bibliometrie/index-english.html

This descriptive study offers an in-depth historical and bibliometric analysis of academic research on tabletop role-playing games. It examines the evolution of publications across various academic formats (conferences, monographs, theses, peer-reviewed articles) and explores new trends in scientific dissemination, including preprints and literature reviews. The analysis reveals a marked growth in scientific output since the origins of role-playing games, with a notable acceleration over the past decade. While research remains primarily based in North America and Europe, new hubs are emerging in Latin America and Asia. Several major themes are explored: the dominance of Dungeons & Dragons, the moral panics of the 1980s and 1990s, therapeutic applications, issues of diversity and representation, as well as the phenomenon of actual plays. The study also includes an analysis of theoretical reflections developed by the gaming community outside of traditional academic publications. It examines how these high-quality, para-academic contributions might be integrated and validated by scholarly institutions. Finally, it highlights the influence of academic practices and values, particularly in terms of citation, on role-playing game culture.  

This translation is to be submitted to a journal. It is a translation of the presentation in French made in the colloquia “Vous êtes dans une taverne…” Retour sur cinquante ans de jeux de rôle (27-28 mars 2024, Metz, Université de Lorraine) that will be published as a chapter in a monograph. The translation relies heavily on Claude 3 Haiku by Anthropic and ChatGPT 4o by OpenAI.

Tuesday, June 25, 2024

On the Shoulders of Cloud Giants: dataviz with JavaScript in Observable

Extrait de diagramme d'accord 

My project On the Shoulders of Cloud Giants which attempts to describe citation practices in tabletop role-playing publications is a bit dormant at the moment. I am testing a new technique which consists of creating automatic citation indexes but it takes time.

Here it is : https://observablehq.com/@pascaliensis/on-the-shoulders-of-cloud-giants

  • The code queries Wikidata and returns the data in a structured manner in the form of (mainly) a series of pairs between a citing tabletop role-playing game and a cited TTRPG.
    • The data exists in Wikidata thanks to property P2860 (cites work).
    • The code is in the appendix (at the very bottom of the Observable page) in the variable query=
    • Other data is repatriated along the way: date of publication, “movement” to which the role-playing game belongs (The Forge, OSR, etc.), publishing house and game mechanics.
  • This data in the form of a table is encoded in JSON format. This is important because as we are going to do JavaScript visualizations, we need to structure the data in this format so that it is absorbed correctly by the JavaScript visualization libraries.
  • Then this JSON table is transformed into a JSON hierarchy, this is an organization of information specifically designed for network/relationship visualizations.
    • Basically, the structure of this JSON hierarchy is divided into two parts: a part describing each game independently (nodes part) and a part listing each relationship (edges part).
    • The transformation was done by a function named table2hierarchy
    • The variable containing this file is located in data_citingCited
  • From there, most of the work is done because the JavaScript libraries do all the rest of the work. You just have to modify them a little each time to have the desired effect (like filtering the data or coloring it). Several visualizations are thus made:
    •         Undirected graphs
    •         Chord diagrams
    •         Classic bar charts, etc.


https://observablehq.com/@pascaliensis/on-the-shoulders-of-cloud-giants

Thursday, February 15, 2024

R Studio & Javascript to analyze your Zotero reference library

My proposal to present the conference “Vous êtes dans une taverne… Retour sur 50 ans de jeux de rôle ” [You are in a tavern… A look back at 50 years of role-playing games] was accepted. Entitled “Historical evolution and bibliometric analysis of academic research on tabletop role-playing in academic publications”, it mainly consists of carrying out a descriptive study of the academic publication on tabletop role-playing since the 1980s.

Since 2014, I have undertaken to collect academic references relating to the study of tabletop role-playing games. This approach resulted in the creation of a database freely accessible via Zotero, comprising a total of 2400 references. Among these, there are 460 peer reviewed articles, 180 books, 300 theses, and many others.

The bibliographic database is freely accessible at: https://www.zotero.org/groups/446523 . Since 2019, Michael Freudenthal has joined me to manage this database.

Last Christmas, I gave you my R

In order to carry out a well-reproducible analysis, not only do I provide open access to the data but I also provide the algorithms that allow them to be analyzed. Everything is posted on GitHub at https://github.com/pmartinolli/ZoteroRnalysis

First, I chose to use the R Studio software because I learned to use it in the context of my work, also because it is powerful and free software, and finally because it is easy to request to ChatGPT 3.5 from OpenAI to fix my coding bugs (which I do very often).

The principle is simple:
  • I export the bibliographic references from Zotero in the formatcsv
  • I import the data into R Studio
  • I grind the data in R Studio
  • R Studio produces nice graphs and other tables for mecsv
  • Along the way, I align my data with that of Wikidata to augment my data (in a process called "reconciliation", done by the OpenRefine software ). For example, with the list of names of academic journals, I will look for the date the journal was created and its country of origin to spot trends.
Secondly, my co-worker Philippe taught me how to use the platform ObservableHQ and JavaScript. I decided to translate part of the R code in JavaScript to benefit from the very user-friendly interface and visualisation functions of this platform. Anybody can make a fork of the code, upload their references and analyze them (in the open with a free account).

The code is here: https://observablehq.com/@pascaliensis/zoterojsnalysis

All I want for this graph is you

The original post was in French for Christmas (to explain the silly titles).

Here are some nice extractions in graphic form. Note that these are not the final versions because, between now and the conference, I will still “shampoo the data” to correct and improve it.




For the rest, I will meet you in Reims (I will be by Zoom), or on this blog, or later in a more definitive publication.

Appendix: text of proposal at the conference


“In the presentation, I will explain how the compilation of peer-reviewed articles and works published since the 1980s, both in English and French, is almost exhaustive and makes it possible to generalize the analyzes that will follow. I will also highlight possible selection and indexing biases that may be present.

“My project consists of carrying out a historical and bibliometric analysis of publications such as peer-reviewed articles and book chapters. This analysis will highlight the variations observed over the years, in various disciplines, for different research subjects, as well as the issues surrounding publication (notably pre-publications, systematic reviews, potentially predatory publications, retractions, etc. .). I will show, for example, how the first publications of the 1980s aimed to explain the rise in popularity of this passion and to respond to the moral panics of the time. Likewise, I will illustrate how recent publications focus more on themes such as gender, actual play and psychotherapeutic aspects linked to the practice of role-playing. I will also highlight the great diversity of academic fields addressing the study of role-playing, ranging from traditional disciplines such as sociology, psychology and the humanities, to more atypical fields such as music, neuroscience and the philosophy. This presentation also extends internationally, encompassing Europe, North America, as well as other parts of Latin America and Asia. I will highlight the predominance of the game Dungeons & Dragons , while identifying other games studied or mentioned alongside this preponderance.

“To enrich this analysis, I will discuss the theoretical and practical reflection of the gaming community on their leisure in parallel with the academic environment. I will also review conferences, congresses and symposia devoted to role-playing, as well as dissertations and theses addressing this subject. Finally, I will discuss citation practices in tabletop roleplaying, in its study, and in its communities of practitioners. »

 

 

Wednesday, December 11, 2019

Citations practices in TTRPG publishing industry : Wikidata, SPARQL and R Studio

Disclaimer: the data are incomplete. This post is a midway tuning of my method and its results.

Introduction

My project On the Shoulders of Cloud Giants (I changed the name) is analysing the citation practices within the tabletop role-playing game publishing industry. For this purpose, :
  • I selected and analysed TTRPG;
  • I designed a database of citations within Wikidata and queried by SPARQL; 
  • I started analyzing the data with R and R Studio.

Selection

The TTRPG selection is based on:
  • All the TTRPG that have a Wikipedia page (estimated coverage: 95%) ;
  • Plus all the TTRPG i heard about in my periodicals the last 10 years (blogs, podcasts, magazines) (estimated coverage: 80%) ; 
  • Plus all the TTRPG cited by a TTRPG selected before.
The selection is moderately biased because the notoriety is externally attributed by a third party (Wikipedia contributors and periodical editors). Each TTRPG selected is validated by the fact, they all have a reference in the database RPGGeek (almost 99.9%).

Counting & Recording

Each mention of citation was saved as a PNG file nameofgame-pXX.png (where XX is the page the snapshot was taken).
I also recorded :
  • the colophons, the credit pages, the acknowledgement page, the forewords, the afterwords, etc.;
  • the bibliographies, the filmographies, the mentions of artworks;
  • and epigraphs (all or some of them).

Database

I choose Wikidata, because it was simple, it was open and it was fulfilling most of my needs. Wikidata can be queried by R Studio. The properties used were:
Unfortunately, there was no property for : has a bibliography and has epigraph

Midway assessment


SPARQL 

SPARQL is a language to query Wikidata and retrieve data. The main query is here.

R Studio Analysis

R and R Studio are very famous in the university around me. Its open, its quite simple to start, there is a lot of community support, its fashionable... so why not using it to process my data ?
I deposited the code of my R Studio project here on GitHub https://github.com/pmartinolli/OtSoCG

To have a look on a very drafty and preliminary graph displaying the data, please click on the picture below:
https://github.com/pmartinolli/OtSoCG/blob/master/Rplot.pdf


Monday, October 1, 2018

October 1st : API Dave Arneson Game Day

October 1st became recently the « Dave Arneson Game Day » in honor of the unsung co-author of the first tabletop role-playing game. That an opportunity to test the API of Zotero, ie. a way to request informations from its database.
Arneson's Blackmoor

https://api.zotero.org/groups/446523/items?tag=_arneson&format=bib
  • tag : _arneson
  • 446523 : database ID
  • format=bib : create a bibliography
  • & : add a request (AND)
 https://api.zotero.org/groups/446523/items?q=dave+arneson&format=bib
  • q= : search words in Creator and Title.
  • + : to separate the words, instead of space.
 https://api.zotero.org/groups/446523/items?tag=_arneson&format=bib&tag=-_fr
  • -_fr : without the tag _fr (note the dash at the beginning)
 https://api.zotero.org/groups/446523/items?tag=_arneson || _gygax&format=bib
  • || (with space before and after, sometimes use %20 instead of space) : used to group item (OR).
 More information on search syntax for Zotero API. The maximum number of references displayes is 150. To browse the full database, visit it at Zotero.

Tuesday, February 6, 2018

Role-playing games : Basic bibliometry with PsycNET (draft)

Martinolli, Pascal. « Role-Playing Games : Basic Bibliometry with PsycNET (Draft) », Feb. 2018. https://drive.google.com/open?id=1IIDcCyXpFGHdRgTVHKxogcNPFYzDp-Gl. (open access and reuse : CC BY)

Number of peer-reviewed publications
about TRPG in PsycNET
This draft paper is a basic bibliometric analysis of the topic of tabletop role-playing games with the PsycNET databases. It also extends the bibliometric analysis to several related topics: role playing, pretend play, psychodrama, etc.

Additional informations (csv data, references, source code...)

Friday, February 24, 2017

Text mining with Calc & Excel: 1001 PCs in the Tomb of Horrors

Some simple LibreOffice Calc and Microsoft Excel calculations for metrics and text mining. Applied to 1001 PCs adventuring in the infamous Tomb of Horrors.
  • if a value in a row match a set of values stored in another row then write something
  • how many values of a specific variable 
  • how many combinations of values of multiple variables 
Download the examples for Calc or for Excel.

Disclaimer: Misuses of Excel in academic is common. Excel is easy to use but it cannot replace real statistical tools for big projects. 

Illustration: from the Tomb of Horrors module, 2nd ed., painted by Erol Otus, 1981.
« Please, don't let your data slip in the green devil mouth nor in the misty arch. »

Tuesday, September 13, 2016

Analyze thousands of PDFs, extract informations and generate a tabular report

Through the Car Library project website, I found ExifTool: free software by Phil Harvey which can analyze thousands of PDFs, extract informations (misc. and metadata) and generate a tabular report easily usable in LibreOffice Calc or MS Excel.
  1. Download the software
  2. Install it
    • Extract exiftool(-k).exe from zip
    • Rename file into exiftool.exe
    • Copy it in c:/windows/
  3. Start > Run > type cmd then Enter
  4. Copy-paste this code :
    exiftool -csv -r -Encrypt -Info -Root -Linearized  -All -ext pdf -m -t c:\collection > report.csv
    • c:\collection contains the PDFs
    • report.csv is generated at root of User
    • Informations extracted : name of file, name of folder, size of file, number of pages, metadatas
    • I still need to know how to get: native PDF ou scanned PDF; if scanned: OCR or not; if scanned: quality of scan; PDF/A (yes/no). There is the software PDF-Analyzer Pro 5.0 by Ingo Schmoekel but I didn't buy it.
It is possible to do that for others types of files (pictures,…).
Method sent to Harry. Applied to his 294 Go collection, analyzed 18420 files in 2212 folders. The processing time took 3 hours and generated a csv file of 52 Mo.

Friday, May 20, 2016

Creating a graph for OD&D

Here some advices to create your own graph with free softwares. Its the equivalent of LaTeX, but for visual diagrams. You just need to modify the code in dot language (very simple) and Graphviz will automatically layout the graph. The example of code is about OD&D.

  1. Install:
    1. Graphviz (!website very slow).
    2. Notepad++
  2. Setup Notepad++
    1. Set up Path variable :
      1. For Windows : Open the Start Menu. > Right-click on Computer and click Properties. > Click Advanced system settings. > Make sure you're on the Advanced tab. > Click Environment Variables. > Under System variables, scroll to find the Path Variable. Click on Path and then click Edit.
      2. Add : ;C:\Program Files (x86)\Graphviz2-38\bin
    2. Setup Graphviz for Notepad++
      1. Notepad++: Plugins > Plugins Manager > Show Plugin Manager : Search and install NppExec plugin
      2. Configure NppExex: Plugins > NppExex > Execute > write this (one line):
        dot « $(FULL_CURRENT_PATH) » -Tpng -o « $(CURRENT_DIRECTORY)\$(NAME_PART).png
        it will launch dot and create a PNG. You can replace with Tpdf to create a PDF.
      3. Save the script.
    3. Setup the syntax coloring in Notepad++
      1. Downloard graphviz-notepad-udl.xml.
      2. Notepad++: Language > Create User Define Language > Import : select the xml. Restart Notepad++.
  3. Practice graph creation :
    1. Download exemple.gv
    2. Open exemple.gv with Notepad++
    3. [Modify content at will]
    4. Plugins > NppExec > OK … a PNG file is created. Watch exemple.png.
Sources: Steinweb., Grevian, TBallantyne. Useful link for the colors here.

Friday, February 5, 2016

Journal and author names


Tool for Zotero: Two CSL style files displaying the journal names only & the author names only.