add 'Working Papers' Section (within publications) to hugo-academic site - r

I am using R blogdown package to create my personal website. I am basing it on the hugo-academic theme (code here)
I would like to add a "working papers" section to the publications.
In my discipline Economics we normally have
"working papers" (pdf is available)
"work in progress" (no pdf yet)
"publications"
How can I add that?
Do I need to change the internals of the hugo-academic theme? (I am an R user/programmer with little webdev knowledge)
I posted as github issue: hugo-academic/issues/416
Edit: I would also like to have the "Selected Publications" section disapear. I could not do that even after setting selected = false on all the publications .md files. This was asked in github issue: hugo-academic/issues/417
Edit2: I would also like to add a new "Work in progress" section (hugo-academic/issues/418).
Edit3: #jsb answer bellow does not alter how the papers are grouped by type (working paper, work in progress, peer-reviewd), which is my main concern. But it does add these cathegories to the metadata (and fixes question two).
They way I understand it now, I would have to add new widgets for "Working Papers" and "Work in Progress". I think I could create them by analogy from the existing widgets.
Where in the code are the widgets are defined?

Answering your first question: I don't think this is possible in the current version of the academic theme. However, what you can do, is to use the publication types that are defined in the config.toml file. In this file, there is a list of publication types that are used to categorize publications. It includes a type called "work in progress". You can also add your own publication types to this list, like so:
publication_types = [
'Uncategorized', # 0
'Conference proceedings', # 1
'Journal', # 2
'Work in progress', # 3
'Technical report', # 4
'Book', # 5
'Book chapter', # 6
'working paper', # 7
'peer-reviewed' # 8
]
For each publication Markdown file, change the publication types parameter to the wanted type, e.g. publication_types = ["7"] for a working paper. The effect is visible when you click on the "Details" link for a publication listed under "Publications" or "Selected Publications".
Answering your second question: to delete a section, delete the corresponding Markdown file from the "content/home" folder. Alternatively, move the unwanted Markdown file to a new folder, e.g. "_not_used", in the "content" folder.
Update: OP found the answer himself, and I am putting it here for future reference:
I found the solution, all I had to do was duplicate the
publications.md file, naming it publications_working_papers.md,
publications_book_chapters.md for instance. In each file use widget =
"publications" and adjust the publication_type accordingly. And also the
weight to determine the order.

Not sure if this is still relevant #lucasmation, but for 'Selected Publications' to be turned off, you'd have to go to contents>home>publications_selected.md and set the widget to be false. Hope this helps.
# Selected Publications widget.
# This widget displays publications from `content/publication/` which have
# `selected = true` in their `+++` front matter.
widget = "publications_selected"
active = false
date = 2012-01-01T00:00:00

I managed to do this in the current hugo-academic setup by using "featured" widgets. In my case I wanted a section for books, one for journal articles and one for working papers.
In the home folder, I made a copy of featured.md and named it working-papers.md. I then renamed the original featured.md to books.md.
From there, I opened books.md, set weight: to 20, changed the title: to Book and set filters: publication_type: to "5".
Next, I opened the new working-papers.md file, set weight: to 30, changed title: to Working Papers and set filters: publication_type: to "3".
Then I renamed publications.md to articles.md, opened the file, set weight: to 25, title: to Journal Articles and set exclude_featured: to true. This ensures that the books and working papers that I want to include in the "featured" widgets do not also appear in my "Journal Articles" section.
Finally, I set featured: to true in the index.md files for my book and working papers in content\publication to populate the new "Book" and "Working Papers" featured widgets.
This gives me three consecutive sections on my website listing my book, journal articles and working papers.
I initially tried it the way you suggested in your note (copying and renaming the publications.md file). You can still do it like this, but the current setup uses the pages widget for publications.md. So instead of changing the widget type, you have to change page_type: to publication and then set publication_type: to whatever type of publication you want to include on that page. This worked OK but strange things happened when I clicked on the "See All Publications" link at the bottom of my "Journal Articles" section, so I ended up using the featured widgets instead.

Related

(Robot Framework IDE) RIDE->Search Tests Window-> Search tab what is "ADD all to Selected" used for

As the title says, in RIDE interface for Robot Framework, on the Search Tests Window, i have two Tabs:
1-Search 2- Add All to Selected
For first Tab, i wonder if i can insert a list of Test cases on search box and if the second TAB
will tick them on the interface.
I couldn't use it in this way but seems to function like that.
Any idea?
Edit:
So here i have added two complete test names separated with comma followed by space:
but as you see the Search Engine finds only the last test name. I can search by what i have added as TestID inside Documentation of each test,and add something like :
TC-69, TC67 but search engine finds as before only the last test.
You don't mention what version of RIDE you are using. In the past there was a bug on that search feature.
Today I have verified that Search function is working as expected on RIDE version 2.0b2, in Windows 10, Python 3.9 and wxPython 4.1.1.
I used a list in the Search box and then Add All to Selected. I use a large test name and a partial test name:
9__Checks if all the firewall rules related to the Network Discovery group are disabled, 2_
Here is a partial capture of the dialog (not the best colors combination ;) :
EDIT: Please edit the search text to not include the word Acces or Accès, so it is only Contextuel_REFSITE.
Another problem (could be a bug in RIDE) is the documentation having latin characters, and the search function become broken.
The tab Tag Search, will only search by tags, and then you have the option to add to Included or to Excluded tests.
Note: It is very important to confirm the version of RIDE you are using (Tools->View RIDE Log).

Customize IBM DiffMerge to export a custom Report

I am using IBM DiffMerge to generate a Report that shows all differences between two .cls files or .sbs files. I was playing with it and I saw that there is a filed in option menu that allows you to change the format of the report, but it implies some keywords, like $elemname to print the element's name or $elemtype to print its type $leftonly or $rightonly which show how many differences are in the left diagram or in the right one.
Now, I was wondering if there are more variables like those above, especially one that can print a component's GUID (unique ID in Rhapsody).
Thanks,
Daniel
I would expect that $GUID will give you what you're looking for.
Under the ReporterPlus installation folder there is a folder named Templates. In it you'll find a file named DiffReport.dpl which you can load it into ReporterPlus for editing like any other template. You must run Rep+ with a command line option so that it loads with the Diffmerge specific schema:
Reporter.exe /mode=dfm
After that you can load the Diffmerge template, and edit it to customize the output of DiffMerge reports. When you do, try adding $GUID into the output.
Regards, Simon

Internal Hyperlinks

I have recently written a blog post using blogdown through RStudio, and I am trying to use internal hyperlinks within the post. Specifically, I am trying to link a 'string of text' to another 'string of text' in a different section of the script.
For instance, I created a blog post that defines some functions in the first section of the document, and my goal was to link those function names to the section of the document where I give examples on using that specific function.
To clarify, it works great when I knit my Rmd; however, it stops working once the blog is posted. Although the function names still appear to be hyperlinked, you are actually brought to the home page of my website, and not the example section of the post which is what I want. If anyone could provide any suggestions or resources I would really appreciate it! Thank you!!
Please find the blog post here (with the internal hyperlinks not working) http://sarahrsalter.com/blog/2018-02-18-dplyr/.
Here is the Rmd code:
+ [**select()**](#Select): evaluates a subset of specified variables
(columns) within a dataset.
## II) Select Functions <a id="Select"></a>
### Example 1

how to fetch old RSS feeds from movabletype site?

Is there any instructor for that? I mean some way to access other pages of movabletype feed?
Example:
MovableTypeSite/feed/page=10
or
MovableTypeSite/feed/rss?page=7
Assuming you are using the default static publishing scheme of Movable Type, your feeds are static files that cannot be modified through URL parameters. The feeds by default contain the last 15 entries, but you could increase this number by modifying the default "Feed - Recent Entries" template of the blog in question.
You could change <mt:Entries lastn="15"> to <mt:Entries lastn="60"> or <mt:Entries days="60"> or use any of the attributes of the Entries tag to customize your output.
It would also be possible to set up "paginated" feeds, such as a per month feed. You could start with the default feed index template referenced above and copy it into a new archive template of the type "Entry Listing".
A little-known feature of Movable Type's search is that it supports multiple templates and by default includes a feed template. In the search results URL, you can specify a page=2 argument (or whatever page). Of course, the trick is that you need a search term -- which may or may not work well for your use.
The URL: [MT Home]/mt-search.cgi?limit=20&Template=feed&search=test&page=2
Use in the template generating the feed (a number superior to the number of entries in the system), publish it, and voilà.

Migrating from (now obsolete) custom ATImage content type

We had a whole collection of Plone 3 sites with a custom Image type
subclassed from ATImage. This allowed us to add an extra image scaling to the
standard list ("'logo':(454, 58)", used by our theme package).
While this still works in Plone 4, it isn't really the correct approach now that
plone.app.imaging is part of the standard toolkit. That can define custom scales on
the fly.
It looks like I can enable plone.app.imaging on any type subclassed
from ATImage by simply setting "sizes = None" for the collection of custom
scales on the type. I am however then left with a redundant subclass of ATImage.
Looking long term, it would be useful to replace all of our existing "FalconImage"
content items (hundreds in total) with standard "Image" content items.
A brief experiment on a test site reveals that if I just walk through the document
tree updating the portal_type attribute from "FalconImage" to "Image" then
the content behaves as an "Image": each object suddenly acquires a
Transform tab and all of the scales defined by ##imaging-controlpanel.
I am sure that there would be fallout from such a brute force approach.
Is there a recommended approach for transforming one type into another?
(I'm happy to add source for our custom ATImage type if anyone thinks that
it is relevant. It is really just a very minimal tweak of ATImage, with a
different collection of sizes on the ImageField)
Yes, there is a recommended approach:
http://pypi.python.org/pypi/Products.contentmigration
The only thing that you have to do is to write a custom migration from FalconImage to Image.
Bye,
Giacomo
You need to use Products.contentmigration but the docs there are no place to start. Use the docs at plone.org for a step-by-step on migrating content.
Thanks to Giacomo and Ross for the pointers.
Just in case it is useful to others, my migration code ended up looking like the following:
from Products.contentmigration.walker import CustomQueryWalker
from Products.contentmigration.archetypes import InplaceATItemMigrator
class FalconImageMigrator(InplaceATItemMigrator):
walker = CustomQueryWalker
src_meta_type = "FalconImage"
src_portal_type = "FalconImage"
dst_meta_type = "ATBlob"
dst_portal_type = "Image"
# Following stolen from plone.app.blob.migrations, ATImageToBlobImageMigrator
# migrate all fields except 'image', which needs special handling...
fields_map = {
'image': None,
}
def migrate_data(self):
self.new.getField('image').getMutator(self.new)(self.old)
# ATFileToBlobMigrator reindexes certain fields. Otherwise we
# need to clear and rebuild the entire catalog.
def last_migrate_reindex(self):
self.new.reindexObject(idxs=['object_provides', 'portal_type',
'Type', 'UID'])
migrator = FalconImageMigrator
walker = migrator.walker(portal, FalconImageMigrator)
walker.go()
print walker.getOutput()
Complications:
Image is a little odd as a destination type, as data gets migrated into the blob store.
We need to update the catalog so that "resolveuid/UID" links generated by TinyMCE
continue to work. last_migrate_reindex() method on Migrator class should be faster than clearing and rebuilding the entire catalog from scratch.

Resources