<commit_before><?xml version="1.0"?>
<?xml-stylesheet href="chrome://scholar/skin/overlay.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://scholar/locale/scholar.dtd">

<overlay id="scholar"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
	<?xul-overlay href="itemPane.xul" ?>
	
    <!-- Include the global XPCOM object -->
	<script src="include.js"/>
	
	<script src="overlay.js"/>
    <script src="itemTreeView.js"/>
    <script src="collectionTreeView.js"/>
	
	<commandset id="mainCommandSet">
		<command id="cmd_scholar_newItem" oncommand="ScholarPane.newItem(1);"/>
		<command id="cmd_scholar_newCollection" oncommand="ScholarPane.newCollection();"/>
		<command id="cmd_scholar_search" oncommand="ScholarPane.search();"/>
	</commandset>
	
	<vbox id="appcontent">
		<splitter id="scholar-splitter" resizebefore="closest" resizeafter="closest" persist="collapsed"/>
		<vbox id="scholar-pane" persist="height collapsed">
			<popupset>
				<popup id="scholar-collectionmenu" onpopupshowing="ScholarPane.buildCollectionContextMenu();">
					<menuitem label="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/>
					<menuseparator/>
					<menuitem label="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();"/>
					<menuitem label="&toolbar.removeCollection.label;" oncommand="ScholarPane.deleteSelectedCollection();"/>
				</popup>
				<popup id="scholar-itemmenu" onpopupshowing="ScholarPane.buildItemContextMenu();">
					<menuitem label="&toolbar.newItem.label;" command="cmd_scholar_newItem"/>
					<menuseparator/>
					<menuitem oncommand="ScholarPane.deleteSelectedItem();"/>
				</popup>
			</popupset>
			<toolbar align="end">
				<label value="Scholar" id="scholar-toolbar-name"/>
				<label value="1.0 Alpha"/>
				<spacer flex="1"/>
				<toolbarbutton class="tabs-closebutton" oncommand="ScholarPane.toggleDisplay()"/>
			</toolbar>
			<hbox flex="1">
				<vbox id="collections-pane" persist="width">
					<toolbar>
						<toolbarbutton id="tb-collection-add" tooltiptext="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/>
						<toolbarbutton id="tb-collection-rename" tooltiptext="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();" disabled="true"/>
						<spacer flex="1"/>
						<toolbarbutton id="tb-collection-menu" type="menu" menu="scholar-collectionmenu"/>
					</toolbar>
					<tree id="collections-tree" hidecolumnpicker="true" context="scholar-collectionmenu"
						onselect="ScholarPane.onCollectionSelected();" seltype="single"
						ondragdrop="nsDragAndDrop.drop(event,ScholarPane.getCollectionsView())"
						ondraggesture="if (event.target.localName == 'treechildren') nsDragAndDrop.startDrag(event,ScholarPane.getCollectionsView());"
						onkeypress="if(event.keyCode == event.DOM_VK_BACK_SPACE || event.keyCode == event.DOM_VK_DELETE){ ScholarPane.deleteSelectedCollection(); return false; }"
						flex="1">
						<treecols>
							<treecol
								id="name_column"
								label="&collections.name_column;"
								flex="1"
								primary="true"/>
						</treecols>
						<treechildren/>
					</tree>
				</vbox>
				<splitter id="scholar-tree-splitter" resizebefore="closest" resizeafter="closest"/>
				<vbox id="items-pane" persist="width" flex="1">
					<toolbar align="center">
						<toolbarbutton id="tb-add" tooltiptext="&toolbar.newItem.label;" type="menu">
							<menupopup/>
						</toolbarbutton>
						<toolbarbutton label="New Note" oncommand="ScholarPane.openNoteWindow();"/>
						<spacer flex="1"/>
						<toolbarbutton id="tb-item-menu" type="menu" menu="scholar-itemmenu"/>
						<label value="&toolbar.search.label;" control="tb-search"/>
						<textbox id="tb-search" type="timed" timeout="250" command="cmd_scholar_search"/>
					</toolbar>
					<hbox id="scholar-search-options" hidden="true">
						<hbox>
							<toolbarbutton type="checkbox" label="Entire Item" checked="true" onclick="var b = this.parentNode.getElementsByAttribute('checked','true'); b[0].checked = false;" command="cmd_scholar_search"/>
							<toolbarbutton type="checkbox" label="Info" onclick="var b = this.parentNode.getElementsByAttribute('checked','true'); b[0].checked = false;" command="cmd_scholar_search"/>
							<toolbarbutton type="checkbox" label="Notes" onclick="var b = this.parentNode.getElementsByAttribute('checked','true'); b[0].checked = false;" command="cmd_scholar_search"/>
							<toolbarbutton type="checkbox" label="Files" onclick="var b = this.parentNode.getElementsByAttribute('checked','true'); b[0].checked = false;" command="cmd_scholar_search"/><commit_msg>Fixes #109, add import/export buttons to interface.  - Look under the cog menu above the Projects list.<commit_after><?xml version="1.0"?>
<?xml-stylesheet href="chrome://scholar/skin/overlay.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://scholar/locale/scholar.dtd">

<overlay id="scholar"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
	<?xul-overlay href="itemPane.xul" ?>
	
    <!-- Include the global XPCOM object -->
	<script src="include.js"/>
	
	<script src="overlay.js"/>
    <script src="itemTreeView.js"/>
    <script src="collectionTreeView.js"/>
	
	<commandset id="mainCommandSet">
		<command id="cmd_scholar_newItem" oncommand="ScholarPane.newItem(1);"/>
		<command id="cmd_scholar_newCollection" oncommand="ScholarPane.newCollection();"/>
		<command id="cmd_scholar_search" oncommand="ScholarPane.search();"/>
	</commandset>
	
	<vbox id="appcontent">
		<splitter id="scholar-splitter" resizebefore="closest" resizeafter="closest" persist="collapsed"/>
		<vbox id="scholar-pane" persist="height collapsed">
			<popupset>
				<popup id="scholar-collectionmenu" onpopupshowing="ScholarPane.buildCollectionContextMenu();">
					<menuitem label="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/>
					<menuseparator/>
					<menuitem label="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();"/>
					<menuitem label="&toolbar.removeCollection.label;" oncommand="ScholarPane.deleteSelectedCollection();"/>
				</popup>
				<popup id="scholar-itemmenu" onpopupshowing="ScholarPane.buildItemContextMenu();">
					<menuitem label="&toolbar.newItem.label;" command="cmd_scholar_newItem"/>
					<menuseparator/>
					<menuitem oncommand="ScholarPane.deleteSelectedItem();"/>
				</popup>
			</popupset>
			<toolbar align="end">
				<label value="Scholar" id="scholar-toolbar-name"/>
				<label value="1.0 Alpha"/>
				<spacer flex="1"/>
				<toolbarbutton class="tabs-closebutton" oncommand="ScholarPane.toggleDisplay()"/>
			</toolbar>
			<hbox flex="1">
				<vbox id="collections-pane" persist="width">
					<toolbar>
						<toolbarbutton id="tb-collection-add" tooltiptext="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/>
						<toolbarbutton id="tb-collection-rename" tooltiptext="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();" disabled="true"/>
						<spacer flex="1"/>
						<toolbarbutton id="tb-collection-menu" type="menu">
							<menupopup>
								<menuitem label="Import..." oncommand="Scholar_File_Interface.importFile();"/>
								<menuitem label="Export Library..." oncommand="Scholar_File_Interface.exportFile();"/>
							</menupopup>
						</toolbarbutton>
					</toolbar>
					<tree id="collections-tree" hidecolumnpicker="true" context="scholar-collectionmenu"
						onselect="ScholarPane.onCollectionSelected();" seltype="single"
						ondragdrop="nsDragAndDrop.drop(event,ScholarPane.getCollectionsView())"
						ondraggesture="if (event.target.localName == 'treechildren') nsDragAndDrop.startDrag(event,ScholarPane.getCollectionsView());"
						onkeypress="if(event.keyCode == event.DOM_VK_BACK_SPACE || event.keyCode == event.DOM_VK_DELETE){ ScholarPane.deleteSelectedCollection(); return false; }"
						flex="1">
						<treecols>
							<treecol
								id="name_column"
								label="&collections.name_column;"
								flex="1"
								primary="true"/>
						</treecols>
						<treechildren/>
					</tree>
				</vbox>
				<splitter id="scholar-tree-splitter" resizebefore="closest" resizeafter="closest"/>
				<vbox id="items-pane" persist="width" flex="1">
					<toolbar align="center">
						<toolbarbutton id="tb-add" tooltiptext="&toolbar.newItem.label;" type="menu">
							<menupopup/>
						</toolbarbutton>
						<toolbarbutton label="New Note" oncommand="ScholarPane.openNoteWindow();"/>
						<spacer flex="1"/>
						<label value="&toolbar.search.label;" control="tb-search"/>
						<textbox id="tb-search" type="timed" timeout="250" command="cmd_scholar_search"/>
					</toolbar>
					<hbox id="scholar-search-options" hidden="true">
						<hbox>
							<toolbarbutton type="checkbox" label="Entire Item" checked="true" onclick="var b = this.parentNode.getElementsByAttribute('checked','true'); b[0].checked = false;" command="cmd_scholar_search"/>
							<toolbarbutton type="checkbox" label="Info" onclick="var b = this.parentNode.getElementsByAttribute('checked','true'); b[0].checked = false;" command="cmd_scholar_search"/>
							<toolbarbutton type="checkbox" label="Notes" onclick="var b = this.parentNode.getElementsByAttribute('checked','true'); b[0].checked = false;" command="cmd_scholar_search"/>
							<toolbarbutton type="checkbox" label="Files" onclick="var b = this.parentNode.getElementsByAttribute('checked','true'); b[0].checked = false;" command="cmd_scholar_search"/>
{'fraction_non_alphanumeric': 0.1681341719077568, 'fraction_numerical': 0.004297693920335429, 'mean_word_length': 5.034788108791904, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 2, '>': 147, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2971106', 'n_tokens_mistral': 3494, 'n_tokens_neox': 2904, 'n_words': 455}