List of all materials

Post Reply
User avatar
Pio2001
Posts: 218
Joined: August 10th, 2011, 9:22 pm
Location: France
Contact:

List of all materials

Post by Pio2001 » December 4th, 2011, 1:23 pm

Hello,
I am currently listing all woods used in puzzle manufacturing so far. My goal is to create a new page on the wiki, called "Threatened Species", where I would list all woods used in puzzle that are either in the Red List of threatened Species of the IUCN, or in the CITES annexes about international trade in endangered species.

At first glance, I'd say about one third of the exotic woods used in puzzles are endangered species. To get a better understanding of what it means, read for example this article : http://www.wwf.mg/?193885/Glimmer-of-ho ... strictions

I am browsing the list of manufacturers in the wiki. I am currently at the letter H and have already listed 134 woods. But this is a boring and long task.

Chris, I know that you have some IT skills. Would it be possible to you to export the list of all fields "Material" from the wiki, in puzzle pages ? Or maybe just the source of all pages in a single text file, from which I would export the Materials easily with Excel and Notepad++ ?

TheJuggler
Posts: 120
Joined: April 25th, 2011, 10:19 pm
Location: California, USA
Contact:

Re: List of all materials

Post by TheJuggler » December 5th, 2011, 4:21 pm

Interesting challenge. Is the intent to create a list of 'Don't ship this puzzle into or out of the US, as customs will end up playing with it?

I think for most puzzles, it would be very hard to show that the woods used were legally harvested, etc, and clearly that proves problematic when it comes to shipping wooden puzzles. It's something that a year ago I'd never have thought about, but now that I'm making puzzles, it seems it's something I need to care about!

User avatar
bluesign2k
Site Admin
Posts: 285
Joined: March 21st, 2011, 12:51 pm
Location: Worcestershire
Contact:

Re: List of all materials

Post by bluesign2k » December 5th, 2011, 11:04 pm

I've had a look at creating the list but the solution isn't quite as simple as it would at first appear. Because some puzzles have different variations by different puzzle makers I figured that the "Materials" field in the template shouldn't require any special formatting... the downside to this is that there is pretty much no way to identify which bits of the text is a material and what is additional text. This means that the woods cannot be listed in categories. I did consider doing this at one point but couldn't think of a sensible way of doing it.

Therefore, the only way I can think to extract the text is to dump the database... but then you'd probably need to write a program to trawl through the dump to extract all text that is preceded by "| Material = " and followed by "|". I'm not sure how practical that would be though and if a new wood was added on the wiki then you'd have to manually add it to the list.

As I said, I like the idea of trying to use Categories to identify all the materials used in the puzzles but I'm not sure how to implement it, I think it'd be a bit of a headache. There's nothing to stop people adding the woods in category links manually (eg below), but the categories would have to be hidden to prevent them appearing at the bottom of the pages as a few puzzles contain a rather enormous list of materials due to the many different variations (Coffin's puzzles being prime examples).

Code: Select all

...
| Materials = [[Category:Ebony|Ebony]]
...

User avatar
Pio2001
Posts: 218
Joined: August 10th, 2011, 9:22 pm
Location: France
Contact:

Re: List of all materials

Post by Pio2001 » December 5th, 2011, 11:32 pm

bluesign2k wrote:Therefore, the only way I can think to extract the text is to dump the database... but then you'd probably need to write a program to trawl through the dump to extract all text that is preceded by "| Material = " and followed by "|". I'm not sure how practical that would be though
If the data is in text format, then this is no problem : I open the file in Notepad++, I replace all carriage return with nothing, getting a unique huge line. Then I replace all "| " with carriage returns. Then I load the resulting text file into Excel without formatting, getting one cell per row. Then I sort all cells. At this stage all cells beginning with "Material" will be together. I copy and paste them into another sheet. Then I convert the new data using the | as separator. The "Material" are then all isolated into the first column. I can then isolate the part after the "=" using the convert function again.
Then I just keep the result and convert it again using comma as a separator. I should get no more than a dozen of columns. I manually concatenate them, sort the result, and I get a list of all woods and other random text written in all the "Material" fields of the wiki.
bluesign2k wrote:and if a new wood was added on the wiki then you'd have to manually add it to the list.
Anyway, I won't monitor the addition of new woods. My goal is to use the current list as it is, look for their scientific names, and look if they are in the red list or in the CITES Annex, then write an article that summarizes this information.
Once done, I won't update it regularly. All common woods would be already present anyway.
bluesign2k wrote:As I said, I like the idea of trying to use Categories to identify all the materials used in the puzzles but I'm not sure how to implement it,
Anyway, sorting precisely the list of woods used would be impossible. Maple is sold as Sycamore, Black Walnut refers both to a species and to a disease of regular walnut. Utile is the same wood as Sipo. Acacia is most of the time nothing else than Robinia, Green Ebony is not an Ebony by any means. And if Vinco's trees were growing in the tropics, his dark plum would be called "Czech Rosewood"...

Post Reply