WebCT format description - text

I would like to have a reference on the WebCT format to import questions into Moodle.
https://docs.moodle.org/38/en/Import_questions#WebCT_format
shows some examples but I would be interested in how to format essay questions.
The only other page I have found about WebCT was
https://en.wikipedia.org/wiki/WebCT
But that do not refer to the format, only the system.
Where can I find a reference to the WebCT text format?

http://www.pyzdrowski.ws/conference/ICTCM2003/webctquestionsweb.pdf
contains a good description of the textual format, especially
Section Two. Creating a question using a text editor:
starting at page 5:
http://www.pyzdrowski.ws/conference/ICTCM2003/webctquestionsweb.pdf#page=5

Related

How to get description tags from an image in Python

I am familiar with EXIF Tags and how to get them as a dictionary for an image. There are abundant examples on that topic. What I get is a dictionary with many items pertaining to characteristics of an image, like focus, date and time, geo data and so on. What I DO NOT GET and want to be able to read are descriptions that I assigned to an image like: "Kindergarten, Birthday party, Sailing" or whatever. These are named "Description -> Tags" if you right-click on a picture in Windows and go to the Details tab. In Adobe Bridge they are named keywords.
How can I read them in Python?
I have not tested it but this says there is an EXIF tag named ImageDescription that might be what you're looking for.
PS: I'm not really sure about it so wanted to leave this as a comment...but reputation

How to specify the items in reference list using BibTeX? ChemPhysChem LaTeX requirement

I'm revising a manuscript for ChemPhysChem. They just provided a very simple templet here. However, I have some problems meeting the requirement:
Please follow our house style for references for example: [1] X. Y.
Name, A. B. Name, J. Abbr. 2016, 5, 111-120.
This kind of reference hides the title, and I can not find an existing style to meet the need.
I am using the following latex script:
\documentclass{article}
\usepackage[sorting=none, backend=biber]{biblatex}
\addbibresource{ref_r.bib}
What do I need to do to solve the problem? Do I really need to build a new .bst file? Could anyone share their experience on submitting manuscripts on ChemPhysChem using LaTeX?
Don't use biblatex for journal submissions unless your publisher explicitly states that they do accept it. While it is a nice and flexible tool, biblatex is not yet the standard.
Just follow the instructions from the template and use
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%alternatively you may use
\bibliographystyle{unsrt}
\bibliography{mymanuscript.bib}
%and send the .bib file along with your manuscript
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Don't worry if the resulting style might be a bit different from their requirement, they won't use it anyway but convert your source files with their pipeline.
I changed to my latex using BibTeX back, and built a cpc.bst file for ChemPhysChem using the following command with the help of the youtube video:
latex makebst
It would not be that hard to create the bibliography style file using the guide of the above-mentioned video.
And the result looks like
this.

Wanted to know about ZPL to image conversion

I have a requirement in my project where in I need to convert the ZPL code to image format. We are not suppose to use Labelary as it is a lisenced product and my clients will not give permission.
Can you please help with an approach?
Use the official docs for getting started. With these informations you can start writing a parser which then can convert the ZPL label to an image. But be aware, that this can be a very timeconsuming task!
Since you don't have have specified your favourite programming language, I can't give you any further advice.

How to add bullets in featured snippet using structured data?

I want to add bullets in featured snippet. When i search for 'gastric balloon' in google it gives me featured snippet for this link www.bariatric-surgery-source.com/gastric-balloon.html as shows in below image :
PLEASE OPEN THIS IMAGE => https://i.stack.imgur.com/1MBoD.png .
I have marked those lines with red color i.e i want to make display them with bullets symbol instead of plain text.
Someone suggest me that it could be possible with structured data but how?
And which code i have to write and where?
You have done everything semantically, so I would make the assumption that Google will strip out any formatting, and apply their own.
Best thing you could do is mark it up with ListItem schema.
An list item, e.g. a step in a checklist or how-to description.
Source - https://schema.org/ListItem

How can I get max fontsize of a pdf using pdfbox

I use pdfbox extraction for some information from a pdf, but how can I extract every objects information? If one of them contains the stream, how can I decode the stream to display?
Can I get the maximum fontsize from a pdf box? I think if I can get every objects fontsizes and sort them, then I get the object which has the maximum fontsize?
I use pdfbox extraction some informaton of a pdf. But how can I extraction every objects' information.if one of them contains the stream, how can I decode the stream to display.
If by every object you mean everything drawn as part of the page content, these objects are contained in the page content streams and in referenced Xobject streams. You can parse these streams using a parser derived from the PDFStreamEngine class.
That class already does most of the heavy-lifting like retrieving individual operations from the streams, managing a stack of graphic states, etc. You will have to supply some callbacks, though, for operations drawing the objects you are interested in.
To get an idea how to extend that class properly, have a look at some subclasses provided with PDFBox, e.g. PDFTextStripper, PDFMarkedContentExtractor, or PageDrawer.
Can I get the maximum fontsize from a pdf box? I think if I can get every objects' fontsizes and sort them, then i get the object which has the maximum fontsize?
Indeed, you can use the above-mentioned PDFTextStripper or more exactly, you can use a class derived from it. The text stripper as is mainly returns plain text but you can override certain of its methods and get text with additional information.
E.g. you can override writeString(String text, List<TextPosition> textPositions). Its standard implementation only uses the text, i.e. the extracted plain text, but you can inspect the textPositions, i.e. text with extra information, among them position and size.
This answer shows how to override PDFTextStripper.writeString get access the font name. Similarly you can access the font size. Beware, there are two TextPosition methods for this, getFontSize and getFontSizeInPt, and you might actually need yet another kind of size.
EDIT
In a comment, the OP asked
How can I get start with PDFSteamEngine???
As mentioned above, have a look at some subclasses provided with PDFBox. The most prominent surely is the PDFTextStripper.
The most simple PDFTextStripper use looks like this:
PDFTextStripper stripper = new PDFTextStripper();
stripper.setSortByPosition(true);
PDDocument document = PDDocument.load(PDF_DOCUMENT);
String text = stripper.getText(document);
document.close();
This only extracts the plain text of the document. For more specialized tasks look at these sample usages:
ExtractTextByArea.java - PDFBox example on how to extract text from a specific area on the PDF document
PrintTextLocations.java - PDFBox example on how to get some x/y coordinates of text
Get font of each line using PDFBox - stackoverflow answer illustrating how to extract text with font information
Identifying the text based on the output in PDF using PDFBOX - stackoverflow answer illustrating how to extract text with color information
How to determine artificial bold style ,artificial italic style and artificial outline style of a text using PDFBOX - stackoverflow answer illustrating how to extract text identifying certain artificial styles
PDF file extraction using PDFBOX for tabular data - stackoverflow answer illustrating how to extract text attempting to reflect the PDF file layout in the output
How to check if a text is transparent with pdfbox - stackoverflow answer illustrating how to extract only text not covered by some image
More usage examples of PDFStreamEngine and other sub-classes:
PrintImageLocations.java - PDFBox example on how to get the x/y coordinates of image locations, based on PDFStreamEngine directly
Get Visible Signature from a PDF using PDFBox? - stackoverflow answer illustrating how to draw annotations, especially signature visualizations, based on PageDrawer
How can I obtain the Textposition from a PDF???
As mentioned in my original answer, use a PDFTextStripper and override writeString(String text, List<TextPosition> textPositions). Its standard implementation only uses the text, i.e. the extracted plain text, but you can inspect the textPositions, i.e. text with extra information, among them position and size.

Resources