yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] trabikoenig:
Meeting Notes Template

One of the things that I really missed when I rooted and installed a custom rom on my Note and lost SNote was the meeting notes template. Therefore I made the attempt to recreate the template.

The title at the top changes depending on what you call the notebook.

Consecutive pages are only lines with the page number showing at the bottom of the page.

Here is the code:

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
notebook = LN.getName();
page = LN.getPage();
LN.setStrokeWidth(scale);
border = 50 * scale;
vert_space = 100 * scale;
half_vert = vert_space / 2;
title_text = 50 * scale;
title_vert = 75 * scale;
text_size = 20 * scale;
text_vert = 35 * scale;
text_hor = 5 * scale;
y = border;

if (page == 1)
{
LN.drawLine(border, border, width - border, border);
LN.drawLine(border, border + vert_space, width - border, border + vert_space);

y += vert_space;

temp_y = y;

for (i = 0; i < 11; i++)
{
LN.drawLine(border, temp_y, width - border, temp_y);
temp_y += half_vert;
}

LN.setAlpha(.25);
LN.drawFilledRect(border, border, width - border, border + vert_space);

temp_y = y;

y += half_vert;

LN.drawFilledRect(border, y, border + vert_space, y + vert_space);
LN.drawFilledRect(width / 2, y, (width / 2) + vert_space, y + half_vert);
y += vert_space + half_vert;
LN.drawFilledRect(border, y, width - border, y + half_vert);
y += (vert_space * 2) + half_vert;
LN.drawFilledRect(border, y, width - border, y + half_vert);

y = temp_y;

LN.setColor(0, 0, 0);

LN.setTextSize(title_text);
LN.setTextAlign(0);
LN.drawText(notebook, width / 2, border + title_vert);

y += half_vert;
LN.setTextSize(text_size);
LN.setTextAlign(1);
LN.drawText('Date:', border + text_hor, y + text_vert);

LN.drawText('Time:', width / 2 + text_hor, y + text_vert);

LN.drawText('Location:', border + text_hor, y + (85 * scale));

y += vert_space + half_vert;

LN.drawText('Attendees:', border + text_hor, y + text_vert);

y += (vert_space * 2) + half_vert;

LN.drawText('Meeting Notes:', border + text_hor, y + text_vert);

y += vert_space;

LN.drawRuledPattern(scale, border, y, width - border, height - border, false);
}
else
{
LN.setTextSize(30 * scale);
LN.setTextAlign(0);
LN.drawText('Page ' + page, width / 2, height - text_vert);

LN.drawRuledPattern(scale, border, border, width - border, height - border, false);
}

I guess I am too new to add the image... So I added it in attachments.

Also Including the javascript file.

ENJOY!!

PS. Awesome app by the way! LOVE IT!

PPS. I have changed the code so that it adjusts to the color you select for the pattern color.
[Android Apps and Games] trabikoenig:
Selected Pattern Color

Is there any way to get the selected pattern color in some fashion like LN.getScale(). I noticed that it is set in the XML file and am wondering if there is an easy way to get settings from the file or through a function.

I am interested in setting a color through LN.setColor() but using the selected pattern color. Ex. LN.setColor(LN.getPatternColor());

Thanks!!!
[Android Apps and Games] acadoid:
[MENTION=5471513]trabikoenig[/MENTION]: The initial color is the one that you set in the dialog, so if you do neither call LN.setColor() nor LN.setAlpha(), all drawings will be in this color. To allow to access the pattern color via a function is an interesting idea, I noted it down. However, it might be better do add a function LN.setPatternColor() which directly sets the pattern color that you have set in the dialog. Alternatively (or additionally), one could add four functions LN.getRed(), LN.getBlue(), LN.getGreen(), and LN.getAlpha() which return the components of the active color. This would allow to save the pattern color before changing the color.
[Android Apps and Games] trabikoenig:
The thought was from the Meeting Notes Template that I created, I was thinking it would be cool to take the set pattern color and alter it a little for the shaded areas. So if you selected a blue color as shown then the shaded areas would be a little lighter. Then if you selected green the same effect would happen. I have just realized that the same effect could be accomplished by changing the Alpha. I think I will test this instead.

Thanks for the quick response.
[Android Apps and Games] acadoid:
[MENTION=5471513]trabikoenig[/MENTION]: I added a command LN.setColor() (without parameters) that sets the color to the one chosen in the dialog, this will be part of the next update.
[Android Apps and Games] Roundtableprez:
How does one use these custom scripts? Sorry I'm new
[Android Apps and Games] acadoid:
[MENTION=4150976]Roundtableprez[/MENTION]: LectureNotes comes with several examples of custom paper pattern.

To use one of these examples, open the notebook settings, click on `custom´ paper pattern, this will bring up the JavaScript editor. In the main menu, select `Use template´, this will bring up the custom paper pattern overview displaying all examples. Select one of the examples by clicking on it, this brings you back to the JavaScript editor and you see the corresponding JavaScript code. Click on the `back´ button and confirm that you wish to use this code, this brings you back to the notebook settings. Click on `OK´ to use the new settings.

In the JavaScript editor, you can modify the JavaScript code of the example (select `Run´ to see the result) or code your own example.
[Android Apps and Games] Roundtableprez:
Thanks for the speedy reply. This app is fantastic for my schooling. Will buy the paid one for sure !
[Android Apps and Games] acadoid:
[MENTION=5471513]trabikoenig[/MENTION]: I just uploaded v2.3.11 into the app stores in which there are several new commands, including LN.setColor() (which sets the initial color chosen in the dialog) I already mentioned.
[Android Apps and Games] matsuru:
acadoid,

A few questions:

01. Is using an image or pdf as template better ? which one works the best? Which one uses less memory ?

02. I think using the java scripts is the best for notebook patterns. But I am no coder. Possible to come out with a seperate app (android/windows/online) that we can customise the patterns and it will generate the java script for us? So we can copy and paste .

Thank you very much ! :)
[Android Apps and Games] big_w:
Good questions , as for number 2 I would love this ability or new paid-for app, as I am sure would others who don't or can't code.
[Android Apps and Games] acadoid:
[MENTION=1074317]matsuru[/MENTION]: 1. If you already have a form or a similar object as image, it is probably better to use image paper pattern, in particular if it is rather complex.

[MENTION=1074317]matsuru[/MENTION] & big_w: 2. Interesting idea, but at which level should it work? Somewhat like a drawing tool (so that you can draw lines and other geometrical objects) which outputs JavaScript code?
[Android Apps and Games] big_w:
Yes, keep it as simple as possible for us non technical people. So a easy drawings lines , colours, text e.g. page number.

This would be a great additional app.
[Android Apps and Games] trabikoenig:
May I suggest an easy solution for non coders; simply create a template or form in Microsoft Word or Excel, then simply save the file as .pdf and import it into Lecture Notes.

Granted this would not allow for specific automation of things like page numbers and other things, but it is really easy to create a "form" in Word or Excel and the import feature is easy enough. At least this can get you buy for the time being.

Option 2: It's worth asking and explaining what you would like to do, and if it is easy enough, someone might be willing to throw it together.
[Android Apps and Games] matsuru:
That would do the trick. Acadoid recommended using image instead.

I also believe that using script will cut down the file size which will improve the overall performance of the app, especially for old device. :)

some ideas:

→ I like the custom paper setting in lecture notes where u can select some predefined template and open to edit in JavaScript mode.

→ we can keep it the same. For the non-coders, there will be a button to press to access to a plug in / seperate app where customization can be done thru a WYSIWYG graphical type of template making. After which will generate the java code for the user to copy and paste into.

→ of course, there will be some limitation on what the graphical template creator can do. It depends on how far the app developer willing to code it.

→ the template editor has the similar UI like Excel where there are cells with gridlines. We can mark the cell to be filled with colors or dynamic info like dates & time. We can set page size. We can draw lines or create boxes.... etc.

→ other options can be:

i. Windows/mac version software,

ii. Windows / Mac version Excel - javascript convertor,

iii. online based template editor.

These are some ideas that pop into my mind at the moment. I am no coder. I am an illustrator. So feel free to add on / debate / contribute your suggestions and ideas.

I hope the discussion will help Acardoid come out with a good solution to improve user experience. :)
[Android Apps and Games] unleashed3107:
Is it possible to get out a Text with the date the notebook was created? I tried it the traditional way (get.month ... year ... day ...), but it changes every time to present date i open the Notebook.
[Android Apps and Games] acadoid:
[MENTION=3584430]unleashed3107[/MENTION]: You cannot access the notebook's creation date with custom paper pattern, but to allow that it is an interesting idea, I noted it down.
[Android Apps and Games] unleashed3107:
I would really appreciate this function if you can implement it.

Your work is crazy, I love lecture notes and look forward to upcoming updates :) me and two classmates use the note 10.1 and your app. We can't think of writing the scripts without it anymore ^^
[Android Apps and Games] b2dters:
College Ruled Pattern

Can someone write me a javacode for college ruled paper pattern? It's the one with a small empty space box on top. Horizontal lines throughout the remainder of the paper, and a vertical line about 1/10 of the way in on the left? Thank you. I like to make notes on the border when re-reading my notes.
[Android Apps and Games] acadoid:
[MENTION=3584430]unleashed3107[/MENTION]: The next version will allow to access notebook and page creation date.

[MENTION=5561320]b2dters[/MENTION]: One of the `ruled with red line´ custom paper pattern examples that LectureNotes has built-in should be pretty close, the location of the red line and how much of the page is kept clear can be easily adjusted.

To use one of the custom paper pattern examples, open the notebook settings, click on `custom´ paper pattern, this will bring up the JavaScript editor. In the main menu, select `Use template´, this will bring up the custom paper pattern overview displaying all examples. Select one of the examples by clicking on it, this brings you back to the JavaScript editor and you see the corresponding JavaScript code. Click on the `back´ button and confirm that you wish to use this code, this brings you back to the notebook settings. Click on `OK´ to use the new settings.
[Android Apps and Games] unleashed3107:
Here is my first selfmade template. I'm sorry for if there is an easier way to write the code, i'm no programmer :)

The date displayed at the top does not work correctly but I will change it as soon as possible :) just delete the "ln.drawtex..datum..." line if you don't want to use it.

I also "programmed" an alternative header so that page 2 and following get smaller topmargins without the headline.

Please tell me if someone has an idea to improve the code or maybe wishs additional lines or something else so I can individualise it for you :)
[Android Apps and Games] ALGshekou:
Adjustable Plain Template with Header Box

This is a plain template with horizontal lines. Very basic but useful.

It has a header box on the top of page 1 that shows the name of the notebook.

The template is setup to easily change the quantity of lines, the background note color, and the line/box color.

Background color, line/box color, and line quantity are changed via lines 6 through 12. The colors are RGB codes (0-255)

width = LN.getWidth();

height = LN.getHeight();

page = LN.getPage();

name = LN.getName();

bkgrdR=252;

bkgrdG=252;

bkgrdB=252;

lineR=178;

lineG=207;

lineB=235;

lineqty=22;

LN.setColor(bkgrdR/255, bkgrdG/255, bkgrdB/255);

LN.drawFilledRect(0, 0, width, height);

LN.setColor(lineR/255, lineG/255, lineB/255);

LN.setTextSize(0.0125 * height);

LN.setTextAlign(0);

LN.drawText("page"+page, 0.5 * width, 0.98 * height);

LN.setStrokeWidth(1);

switch (page) {

default:

for (x = 2; x < lineqty+3; x=x+1)

LN.drawLine(0.05*width, x/(lineqty+2)*height , 0.95*width, x/(lineqty+2)*height );

break;

case 1:

for (x = 4; x < lineqty+3; x=x+1)

LN.drawLine(0.05*width, x/(lineqty+2)*height , 0.95*width, x/(lineqty+2)*height );

LN.setStrokeWidth(6);

LN.drawRect(0.05*width, 0.025*height, 0.65*width, 0.085*height);

LN.setColor(0,0,0);

LN.setTextSize(30);

LN.setTextAlign(0);

LN.drawText(name, 0.35*width, 0.065*height);

break;

}​

ALG
[Android Apps and Games] kemonine96:
I just put together two patterns: one for general note taking that matches what I used to use on paper and another for meetings.

Download: https://nuskunetworks.box.com/s/bybj1chwevfrsztybsq1ubyahnurgx5e

The general pattern has the following on each page

Heading with the following

Notebook title

Notebook creation date

Page number

Page x of N at center, bottom of each page

The meeting pattern is a modified general pattern with the following extra's on the first page

Date

Time

Method (ie. phone, person, webex, etc)

Attendees
[Android Apps and Games] LNnoob:
Meeting notes with verticals?

I like the meeting notes from #97 very much and tried to code it with some verticals on the table. My Javascript isn't that good so maybe someone can help? I put an screenshot as example.

Thx in advance from the LNnoob

EDIT: Did it by myself, not nice but rare::fingers-crossed:

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
page = LN.getPage();
pages = LN.getNumberOfPages();
border = 50 * scale;
vert_space = 50 * scale;
div = (height - border * 2)/ vert_space;
div_round = Math.round(div);
text_size = vert_space / 2;
text_vert = text_size * 1.5;
text_hor = text_size / 2;
y = border;

temp_y = y;

for (i = 0; i < div_round; i++)
{
LN.setAlpha(0.1);
LN.drawLine(border, temp_y, width - border, temp_y);
temp_y += vert_space;
}

LN.drawFilledRect(border, border, width - border, border + vert_space);

LN.setAlpha(1);
LN.setStrokeWidth(0.002 * width);
LN.setTextSize(text_size);
LN.setTextAlign(1);
LN.drawText('topic', border + text_hor, border + text_vert);
LN.drawText('type', border + LN.getTextWidth('topic') * 2 + text_hor * 3, border + text_vert);
LN.drawText('item', border + LN.getTextWidth('topic') * 2 + LN.getTextWidth('type') + text_hor * 5, border + text_vert);
LN.setTextAlign(-1);
LN.drawText('responsible', width - border - text_hor * 3 - LN.getTextWidth('due date'), border + text_vert);
LN.drawText('due date', width - border - text_hor, border + text_vert);

LN.setColor(1, 0, 0);
LN.drawRect(border, border, width - border, div_round * vert_space);
LN.drawLine(border, border, border, div_round * vert_space);
LN.drawLine(LN.getTextWidth('topic') * 2 + border + text_hor * 2, border, LN.getTextWidth('topic') * 2 + border + text_hor * 2, div_round * vert_space);
LN.drawLine(LN.getTextWidth('topic') * 2 + LN.getTextWidth('type') + border + text_hor * 4, border, LN.getTextWidth('topic') * 2 + LN.getTextWidth('type') + border + text_hor * 4, div_round * vert_space);
LN.drawLine(width - border, border, width - border, div_round * vert_space);
LN.drawLine(width - border - LN.getTextWidth('due date') - text_hor * 4 - LN.getTextWidth('responsible') , border, width - border - LN.getTextWidth('responsible') - text_hor * 4 - LN.getTextWidth('due date'), div_round * vert_space);
LN.drawLine(width - border - LN.getTextWidth('due date') - text_hor * 2, border, width - border - LN.getTextWidth('due date') - text_hor * 2, div_round * vert_space);

LN.setTextSize(20 * scale);
LN.setTextAlign(0);
LN.drawText('Seite ' + page + ' von ' + pages, width / 2, height - text_vert);

Any improvements or simplifications? Especially for the vertical line distances? Just let us know ;)

If I have some more hours I will try to merge the first page of #97 with the code above.

Kind regs from the 95% javascript LNnoob :D
[Android Apps and Games] codie3:
Template wanted :)

Hi,

LOVE the app!!!

but I am wondering if you could make me a template. I would like just a plain ruled page, nothing special. But I would like a single vertical line running straight down the middle, so that I can write 2 columns on one page.

Thanks :D

---------- Post added at 10:15 PM ---------- Previous post was at 09:59 PM ----------

Thanks guys, but I can happily say I figured out how to modify a template I already had and I got exactly what I was looking for :D

yaaaaayyyy <3
[Android Apps and Games] cschaetzle:
Need help

Hello,

I'm looking for an Template like that:

I tried to create one but I have no idea what I have to type in.

Hope somebody can help me. :)

Thank you

Christian
[Android Apps and Games] acadoid:
[MENTION=5776955]cschaetzle[/MENTION]: It is a checkered pattern with a white frame, is that correct? What width does the white frame have on each of the four side (preferentially measured in the width of the checkered pattern)?
[Android Apps and Games] cschaetzle:
Right. On top, right and bottom side the frame has 2.5 checked pattern and on the left side 4.5 ckecked pattern.

Gesendet von meinem SM-N9005 mit Tapatalk
[Android Apps and Games] acadoid:
[MENTION=5776955]cschaetzle[/MENTION]: Try

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
step = width / 150 + scale * width / 25;
bbleft = 4.5 * step;
bbright = (Math.floor(width / step) - 2.5) * step;
bbtop = 2.5 * step;
bbbottom = (Math.floor(height / step) - 2.5) * step;
LN.drawCheckeredPattern(scale, bbleft, bbtop, bbright, bbbottom, false);
LN.setStrokeWidth(0.002 * width);
LN.setStrokeCap(2);
LN.drawLine(bbleft, bbtop, bbright, bbtop);
LN.drawLine(bbright, bbtop, bbright, bbbottom);
LN.drawLine(bbright, bbbottom, bbleft, bbbottom);
LN.drawLine(bbleft, bbbottom, bbleft, bbtop);
[Android Apps and Games] cschaetzle:
Thank you very much. This is what i'm looking for.

Gesendet von meinem SM-P905 mit Tapatalk
[Android Apps and Games] pncguy:
3x5 index card

Here's some code for a 3x5 (approximately) index card. This works, but one thing I am confused about is the use of the "clear" variable. The LN.drawRuledPattern draws the pattern in the box whose top is defined as at "clear." But when I LN.drawLine at clear as the y distance, the line is drawn a little above the first ruled line. So I made the variable "mytop" to fix this. Does LN.drawRuledPattern not start drawing ruled lines at the top of its defined box?

[Edit: this isn't a 3x5 card, per se. You set that in notebook settings. What this does is draw a red line on a normal ruled page across the top of the page where the first ruled line would be. If the page is 3x5, it looks like a normal index card.]

width = LN.getWidth();

height = LN.getHeight();

scale = LN.getScale();

line = 0.05 * width;

clear = 0.05 * height;

LN.drawRuledPattern(scale, 0, clear, width, height, false);

LN.setStrokeWidth(0.002 * width);

LN.setColor(1, 0, 0);

mytop = 1.5*clear;

LN.drawLine(0, mytop, width, mytop);
[Android Apps and Games] acadoid:
[MENTION=5459868]pncguy[/MENTION]: In case of the variants that take left, top, right, and bottom, these four values describe a bounding box to which the pattern is clipped; the location of the pattern lines is only defined by the scale parameter.
[Android Apps and Games] pncguy:
Scalable Engineering Paper

Okay, here's another version of the Engineering Paper. I love the original, but I wanted to have four squares per box rather than five. And then I thought it would be cool to change the size of the boxes.

This code uses the scale in the notebook settings to give you from 2 to 10 squares per box (0% to 100% scale). It also has a hard coded variable numcols, which is optimized at 7, but works at least from 6 to 9. The centering of the text and the size of the void space at the bottom are not just right for any but numcols = 7.

This would work just fine if the numsquares didn't use the scale variable, but instead had the user just enter a number. But I wanted to see how to use the scale variable.

This version also has "Page n" in the top left corner, "Date" in the left third of the top, "Title" in the center third of the top, the number of squares per box in the top right, and "Page n of N" in the bottom center.

I would love to hear your feedback!

width = LN.getWidth();

height = LN.getHeight();

page = LN.getPage();

pages = LN.getNumberOfPages();

scale =LN.getScale();

numsquares = 2+Math.ceil(5*scale);

numcols = 7;

colwid = width/(numcols + 1.5);

maxrow = Math.floor(height/colwid);

numrows = maxrow-2;

squaresize = colwid/numsquares;

lborder = colwid;

rborder = (numcols+1)*colwid;

tborder = colwid/2;

totalgridwidth=colwid*numcols;

littlerow = numrows*numsquares;

littlecol = numcols*numsquares;

LN.setColor(.957,.976,.849);

LN.drawFilledRect(0, 0, width, height);

LN.setColor(.365,.690,.173);

LN.setStrokeWidth(width/500);

LN.drawLine(0, tborder, width, tborder);

LN.drawLine(lborder, 0, lborder, height);

LN.drawLine(rborder,0,rborder,height);

LN.drawLine(lborder+(totalgridwidth*.33),0,lborder+(totalgridwidth*.33),tborder);

LN.drawLine(lborder+(totalgridwidth*.67),0,lborder+(totalgridwidth*.67),tborder);

LN.setStrokeWidth(width/1000);

LN.setColor(.2,.365,.690,.173);

for (x = 0; x < littlerow; x=x+1)

LN.drawLine(lborder,tborder+((x+1)*squaresize) ,rborder,tborder+((x+1)*squaresize));

LN.setStrokeWidth(width/500);

LN.setColor(.3,.365,.690,.173);

for (x = 0; x <numrows+1 ; x=x+1)

LN.drawLine(lborder,(tborder)+((x+1)*colwid) ,rborder,(tborder)+((x+1)*colwid));

LN.setStrokeWidth(width/1000);

LN.setColor(.2,.365,.690,.173);

for (x = 0; x < littlecol; x=x+1)

LN.drawLine(((x+1)*squaresize)+lborder,tborder,((x+1)*squaresize)+lborder ,(tborder)+(colwid*numrows));

LN.setStrokeWidth(width/500);

LN.setColor(.2,.365,.690,.173);

for (x = 0; x < numcols; x=x+1)

LN.drawLine(((x+1)*colwid)+lborder,tborder,((x+1)*colwid)+lborder , tborder+(colwid*numrows));

LN.setTextSize(0.02 * width);

LN.setTextAlign(0);

LN.drawText("Page " + page + " of " + pages, 0.53 * width, 0.99 * height);

LN.drawText("Page " + page, 0.06 * width, 0.025 * height);

LN.drawText("Date",0.25*width,0.025*height);

LN.drawText("Title", 0.53*width,0.025*height);

LN.drawText(numsquares, 0.975*width,0.025*height);
[Android Apps and Games] herph:
Date stamps

Would someone be willing to post some examples of how to print a page creation date in various formats. I know there's a command for that, but I don't know how to "use JavaScript's Date object to convert to a human-readable form" as it says in the help file.

Thanks in advance.
[Android Apps and Games] acadoid:
[MENTION=5786315]herph[/MENTION]: Use

date = new Date(LN.getCreationDate());

to get the notebook's creation date as JavaScript Date object, then

year = date.getFullYear();

yields the year etc., cf. http://www.w3schools.com/jsref/jsref_obj_date.asp.
[Android Apps and Games] dragon005:
Hi acadoid , may i have a suggestion for LectureNotes , sorry to put the suggestion here but it have a direct relation to this thread , instead of making patterns by javascript for every shape can you make LectureNotes identify the irregular shapes the user draw and turn it into corrected shapes (as in snote shape match mode) , i mean if the user draw a tilted line lecturenote make the line straight , if the user draw irregular circle lecturenote convert it to circle , if user draw irregular square lecturenotes convert it to square etc ...........