Skip to content

Commit

Permalink
added labels to chapter 3 -> references to follow
Browse files Browse the repository at this point in the history
  • Loading branch information
Trienko committed Mar 1, 2017
1 parent 03c26b3 commit 11b1a45
Show file tree
Hide file tree
Showing 7 changed files with 1,131 additions and 524 deletions.
178 changes: 23 additions & 155 deletions 3_Positional_Astronomy/3_0_introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"editable": true
},
"source": [
"Automatic referencing code:"
"Referencing code:"
]
},
{
Expand All @@ -171,16 +171,31 @@
"deletable": true,
"editable": true
},
"outputs": [],
"outputs": [
{
"data": {
"text/html": [
"<script> aval=document.getElementById(\"pos_chp\"); aval.href=\"../3_Positional_Astronomy/3_introduction.ipynb#pos_chp\"; aval.innerHTML = \"&#8493 3 Positional Astronomy\"; </script>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import os, sys\n",
"init_path = os.path.abspath(os.path.join('../init/'))\n",
"sys.path.append(init_path)\n",
"\n",
"import pickle\n",
"from incfunc import init_ipyref_filename, ipy_label, ipy_ref\n",
"from ipywidgets import widgets\n",
"from IPython.display import HTML \n",
"\n",
"lfilename='../3_Positional_Astronomy/3_0_introduction.ipynb'\n",
"ipyrefname=init_ipyref_filename()\n",
"\n",
"try:\n",
Expand All @@ -189,7 +204,7 @@
" f = open(ipyrefname, 'rb')\n",
" sdict = pickle.load(f)\n",
" f.close()\n",
" debug_lvl=0 \n",
" debug_lvl=0\n",
" if debug_lvl > 10: print 'loaded', ipyrefname\n",
"else :\n",
" if debug_lvl > 10: print \"Running through mainlist for updating reference\"\n",
Expand All @@ -211,113 +226,13 @@
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"idstr='pos_chp'\n",
"titlestr='Positional Astronomy'\n",
"ipy_label(sdict, 'chapter', idstr, titlestr)\n",
"idcntr='_xyz'\n",
"stval={}\n",
"ipy_ref(sdict, idstr, stval, idsub=idcntr, debug_lvl=debug_lvl)\n",
"widgets.PlaceProxy(child=stval['child'], selector=('.'+stval['class']),display='inline',width='100px')"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"idstr='pos_sec_eq'\n",
"idcntr='_intro'\n",
"stval={}\n",
"ipy_ref(sdict, idstr, stval, titlestr='', sdisplay='extfile', idsub=idcntr, debug_lvl=debug_lvl)\n",
"widgets.PlaceProxy(child=stval['child'], selector=('.'+stval['class']),display='inline',width='100px')"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"idstr='pos_sec_hor'\n",
"idcntr='_intro'\n",
"stval={}\n",
"ipy_ref(sdict, idstr, stval, titlestr='', sdisplay='extfile', idsub=idcntr, debug_lvl=debug_lvl)\n",
"widgets.PlaceProxy(child=stval['child'], selector=('.'+stval['class']),display='inline',width='100px')"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"idstr='pos_sec_halst'\n",
"idcntr='_intro'\n",
"stval={}\n",
"ipy_ref(sdict, idstr, stval, titlestr='', sdisplay='extfile', idsub=idcntr, debug_lvl=debug_lvl)\n",
"widgets.PlaceProxy(child=stval['child'], selector=('.'+stval['class']),display='inline',width='100px')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"idstr='pos_sec_dir'\n",
"idcntr='_intro'\n",
"stval={}\n",
"ipy_ref(sdict, idstr, stval, titlestr='', sdisplay='extfile', idsub=idcntr, debug_lvl=debug_lvl)\n",
"widgets.PlaceProxy(child=stval['child'], selector=('.'+stval['class']),display='inline',width='100px')"
]
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
"collapsed": true
},
"outputs": [],
"source": [
"idstr='pos_sec_fur'\n",
"idcntr='_intro'\n",
"stval={}\n",
"ipy_ref(sdict, idstr, stval, titlestr='', sdisplay='extfile', idsub=idcntr, debug_lvl=debug_lvl)\n",
"widgets.PlaceProxy(child=stval['child'], selector=('.'+stval['class']),display='inline',width='100px')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Hallo is your name ok? <a class=trienko>d</a> Do it now..."
"rstr=ipy_label(sdict, 'chapter','pos_chp', 'Positional Astronomy', lfilename);HTML(rstr)"
]
},
{
Expand All @@ -327,7 +242,7 @@
"editable": true
},
"source": [
"# <a class='pos_chp_xyz' id='pos_chp'></a>"
"# <a id='pos_chp'></a>"
]
},
{
Expand Down Expand Up @@ -474,53 +389,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.3"
},
"widgets": {
"state": {
"05934859678b4b12829784e1bde372e8": {
"views": [
{
"cell_index": 12
}
]
},
"063e3ec3669947b793db3d105a651f80": {
"views": [
{
"cell_index": 8
}
]
},
"15431398404e4c6d9c9c6efcb79f24b0": {
"views": [
{
"cell_index": 11
}
]
},
"4acbfcbcb19d4e3b97f283f605b76732": {
"views": [
{
"cell_index": 10
}
]
},
"57825bcb058f4792acccaaabe4f4878d": {
"views": [
{
"cell_index": 13
}
]
},
"bd2c787fe8a249c39779df3740893e84": {
"views": [
{
"cell_index": 9
}
]
}
},
"version": "1.2.0"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 11b1a45

Please sign in to comment.